Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New Coder
    Join Date
    Nov 2011
    Posts
    36
    Thanks
    6
    Thanked 0 Times in 0 Posts

    spacing between divs

    Hello,

    Please have a look at this site: http://www.shahspace.com/bow/home.html

    As you can see, I have two div colored pink and some space between them and around them. I'd like to get rid of all spacing but I can't.

    Here's the code:

    Code:
    <html>
    
    <head>
    
    <title>The Bow Tower</title>
    
    <style>
    
    body
    {
    background: url('content_bg.jpg');
    background-repeat: repeat-x;
    }
    
    #textdiv
    {
    width: 230px;
    height: 100%;
    background-color: #ffaaaa;
    float: left;
    padding: 0;
    margin: 0;
    }
    
    #imgdiv
    {
    width: 250px;
    height: 100%;
    background-color: #ffaaaa;
    padding: 0;
    margin: 0;
    }
    
    span
    {
    font-size: 18pt;
    font-family: verdana;
    font-weight: bold;
    }
    
    </style>
    
    </head>
    
    <body>
    
    <div id="textdiv">
    <br>
    <br>
    <span>
    The Bow Tower<br>
    </span>
    <br>
    <br>
    <ul>
    <li><a href="services.html">Services</a></li>
    <li><a href="information.html">Information</a></li>
    <li><a href="health_safety.html">Health and Safety</a>
    <li><a href="index.html">Index</a>
    </ul>
    </div>
    
    <div id="imgdiv"><img align=right src="bow tower.jpg" border=0></div>
    
    </tr>
    </table>
    
    </body>
    </html>
    What can I do to get rid of the spacing (I'm working in IE9).

  • #2
    Regular Coder Kevin_M_Schafer's Avatar
    Join Date
    Apr 2011
    Location
    Fairfax, Minnesota, U.S.A.
    Posts
    482
    Thanks
    97
    Thanked 17 Times in 17 Posts
    gib65,

    Will it work to add "float:left;" to the imagediv?

    --Kevin

    .
    My keyboard is an IBM from 1993 and I like it that way. | Who is Dan Well? Everyone always says I know Dan Well.Building a web page is like building a birdhouse. Put it up there and watch 'em come. | Maintaining the aspect ratio of an image is more important than having a cold orange pop.

  • #3
    New Coder
    Join Date
    Nov 2011
    Posts
    36
    Thanks
    6
    Thanked 0 Times in 0 Posts
    Yes, that worked. Also added margin: 0 to body.


  •  

    Posting Permissions

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