Old 28-03-2007, 16:41   #1 (permalink)
e.boal
Loveable loser.
 
e.boal's Avatar
 
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!
  Reply With Quote
Old 28-03-2007, 16:43   #2 (permalink)
february.stars
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
  Reply With Quote
Old 28-03-2007, 16:45   #3 (permalink)
e.boal
Loveable loser.
 
e.boal's Avatar
 
Join Date: Apr 2006
Location: Newcastle
Posts: 231
You star. Thank you very much
  Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search


Contact Us - Web Design Forums - Archive - Top
Search Engine Optimization by vBSEO 3.0.0 RC8