Mysterious space between DIVs

ThePaintGuru

New Member
Messages
208
Reaction score
0
Points
0
I'm throwing together a layout to test some header, background, and footer images I made. The problem is that the DIVs have unwanted whitespace between them. Any ideas?
HTML:
<HTML>
<BODY style="margin:0px; padding:0px; border:0px">
<DIV align="center">
<DIV style="width:720px" align="left">
<DIV style="background-image: url(roundheader.png);height:253px">HEADER
</DIV>
<DIV style="background-image: url(background.png);">
<PRE>
    CONTENT
        CONTENT
            CONTENT
                CONTENT        
</PRE>    
</DIV><DIV style="background-image: url(footer.png);height:34px">
Footer
</DIV>
</DIV>
</DIV>
</BODY>
</HTML>
Edit:
EDIT: Figured it out... the PRE tag has margins of its own that push away the other DIVs. Strange
 
Last edited:

Cliff Dude

Member
Messages
63
Reaction score
1
Points
8
<div> usually makes a padded space. If you do not want that space, try <span> which works exactly like a <div> tag.
 

ThePaintGuru

New Member
Messages
208
Reaction score
0
Points
0
I will be doing that later, this is just a quick way to see that everything lines up :).
 
Top