Skip to content Skip to sidebar Skip to footer

Css - Move Text To Right

This is something that annoys me very often. If you create a
and style the border (for example, border-radius: 3px;) the text is almost on top of the border, which look

Solution 1:

padding-left:3px;

Add that to your div which has the text in it.

Read more about padding: http://www.w3schools.com/css/css_padding.asp


Solution 2:

Easy, you can either use padding: 0 3px; (horizontal padding only), padding-left: 3px;..

http://jsfiddle.net/Kyle_Sevenoaks/D3BSL/4/


Solution 3:

i hope you are looking like this :- http://tinkerbin.com/q4cVJ0FF

HTML

<div>stack</div>

CSS

div {
background:red;
border-radius:3px;
    padding-left:3px;
}

you can easily get your desired through padding and you can adjust the padding from all four sides left,right,top,bottom...


Post a Comment for "Css - Move Text To Right"