English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

This is actual from my .css file

#subcontent {
float:right;
width:160px;
font-size:1.4em;
line-height:1.8em;
border:1px solid;
}

I have the top margin and left margin both at 0px for the page. My questioin is, with the float:right command, everything is perfect except that the border (border:1px solid;) is literally touching the right side of the webpage. How do i create a buffer or pad so that the right border will be off the side of the webpage.

i saw a padding: argument with 4 values call them ex.

padding:(1st) (2nd) (3rd) (4th)

what feature does 1,2,3,4 change relative to the div




Note: I do not wish to change the body border margin, just the div.

Thanks

2006-11-12 07:43:44 · 3 answers · asked by f1avor_f1av 3 in Computers & Internet Programming & Design

3 answers

Not sure what ure saying really but if i do see you right u want the box to be slightly away from the right...

FOr this padding wudnt work as u expect. Things inside the box wud move away from edge but the border wud stay..

what u need is margin-right:10px;

chaging the 10px to ure value u choose....this shud be fine...


If i havnt understood u use the yahoo email me thingy and explian more....perhaps with live demo :-)

2006-11-12 08:05:59 · answer #1 · answered by Anonymous · 0 0

Here's where the values go:

padding: (top) (right) (bottom) (left);


Hope this helps,
DianeD
http://www.dironwebdesign.com

2006-11-12 11:06:48 · answer #2 · answered by DianeD 4 · 0 0

you need to set margin
margin-right: 20px;
or whatever value.
Understand?

2006-11-12 08:14:52 · answer #3 · answered by Mondschein! 5 · 0 0

fedest.com, questions and answers