+ Reply to Thread
Results 1 to 5 of 5

Thread: Mysterious space between DIVs

  1. #1
    ThePaintGuru is offline x10 Sophmore ThePaintGuru is an unknown quantity at this point
    Join Date
    Mar 2008
    Posts
    208

    Mysterious space between DIVs

    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 Code:
    <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 by ThePaintGuru; 03-29-2008 at 08:38 PM. Reason: Automerged Doublepost
    ----------
    If you found my post helpful in some way, I'd really appreciate a few credits as I'm saving up for a domain.

    You can click the blue check mark in the upper right corner of this post to increase my reputation.

  2. #2
    Cliff Dude's Avatar
    Cliff Dude is offline x10Hosting Member Cliff Dude is an unknown quantity at this point
    Join Date
    Dec 2007
    Location
    On the Internet.
    Posts
    63

    Re: Mysterious space between DIVs

    <div> usually makes a padded space. If you do not want that space, try <span> which works exactly like a <div> tag.

  3. #3
    ThePaintGuru is offline x10 Sophmore ThePaintGuru is an unknown quantity at this point
    Join Date
    Mar 2008
    Posts
    208

    Re: Mysterious space between DIVs

    I did a
    <STYLE>
    * {border: 0px;
    padding: 0px;}
    </STYLE>
    and it fixed the problem
    ----------
    If you found my post helpful in some way, I'd really appreciate a few credits as I'm saving up for a domain.

    You can click the blue check mark in the upper right corner of this post to increase my reputation.

  4. #4
    Cliff Dude's Avatar
    Cliff Dude is offline x10Hosting Member Cliff Dude is an unknown quantity at this point
    Join Date
    Dec 2007
    Location
    On the Internet.
    Posts
    63

    Re: Mysterious space between DIVs

    I suggest you stick all of your CSS formatting in a stylesheet.

  5. #5
    ThePaintGuru is offline x10 Sophmore ThePaintGuru is an unknown quantity at this point
    Join Date
    Mar 2008
    Posts
    208

    Re: Mysterious space between DIVs

    I will be doing that later, this is just a quick way to see that everything lines up .
    ----------
    If you found my post helpful in some way, I'd really appreciate a few credits as I'm saving up for a domain.

    You can click the blue check mark in the upper right corner of this post to increase my reputation.

+ Reply to Thread

Similar Threads

  1. Incomplete uploads taking up space.
    By silentt in forum Free Hosting
    Replies: 3
    Last Post: 03-26-2008, 09:42 PM
  2. Deleted file still taking up space?
    By silentt in forum Free Hosting
    Replies: 5
    Last Post: 03-25-2008, 10:16 AM
  3. Only one with a space in their name?
    By Jordan Knezevic in forum Off Topic
    Replies: 14
    Last Post: 09-14-2007, 04:56 PM
  4. [OFF] Rent out Signature Space!
    By ikki() in forum The Marketplace
    Replies: 3
    Last Post: 10-04-2006, 04:18 PM
  5. More bandwith less space.
    By hello in forum Feedback and Suggestions
    Replies: 16
    Last Post: 07-15-2005, 06:37 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers