| Home | Register | FAQ | Members List | Search | Today's Posts | Mark Forums Read |
|
|
#1 (permalink) |
|
Loveable loser.
Join Date: Apr 2006
Location: Newcastle
Posts: 231
|
CSS Boxes
Ok. Simple problem I am sure. A div 750px wide with two divs inside it: 510px div floated left and 240px div floated right. Both of these divs have a background image that looks seamless. Above the background image in the left div is some text. When I try and put a margin-left in to bring the text inwards or try padding left, the right div goes below? There must be a simple solution! |
|
|
|
|
|
#2 (permalink) |
|
FetalChamberBurst
Join Date: Mar 2007
Location: Toronto
Posts: 33
|
yes there is, subtract any padding/margin value from the floated divs width/height. adding 10px padding means subtracting 10px from the width With background images, you should be using padding so that it doesnt shift the background image the amount you margin-ing |
|
![]() |