www.webdeveloper.com
Results 1 to 3 of 3

Thread: [RESOLVED] White space between div tags

  1. #1
    Join Date
    Mar 2008
    Posts
    85

    resolved [RESOLVED] White space between div tags

    Code:
    <html>
    
    <head>
    <title></title>
    </head>
    
    <body>
    
    <div style="float:top; background-color:red">
    <p>Top</p>
    </div>
    
    <div style="float:left; background-color:blue; width:100px">
    <p>Left Left Left Left Left Left Left Left Left Left Left Left Left Left Left Left Left Left Left Left Left Left Left Left Left </p>
    </div>
    
    <div style="background-color:green">
    <p>Right Right Right Right Right Right Right Right Right Right Right Right Right Right Right Right Right Right Right Right </p>
    </div>
    
    </body>
    
    </html>
    This is just a thing i was doing to figure out how to use div tags. For some reason there is a white space between the top one, and the bottom 2. Why does it do that, and how do i get rid of this? Thanks for any help.

  2. #2
    Join Date
    Apr 2003
    Location
    Netherlands
    Posts
    21,654
    Code:
    <style type="text/css">
    P {margin:0;} 
    </style>
    At least 98% of internet users' DNA is identical to that of chimpanzees

  3. #3
    Join Date
    Mar 2008
    Posts
    85
    Quote Originally Posted by Fang
    Code:
    <style type="text/css">
    P {margin:0;} 
    </style>
    I knew it was simple! Thank you!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles