Results 1 to 3 of 3

Thread: trouble with DIV placement

  1. #1
    Join Date
    Jan 2008
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default trouble with DIV placement

    Hi, I'm working on trying to build my website with images. The problem that I'm having is that the image for the main part of the website is automatically moved down instead of aligning to the top. I would like a little bit of space between the top and the image, but not so much that it causes the website to have to vertically scroll, as it currently is.

    Here is a screenshot of the problem:

    http://img247.imageshack.us/img247/3064/screenvp2.jpg

    If you want to see the website, go here and click on the image in the middle:

    http://katelphotography.com/popup.html

    And here is the code I'm using, if that would be helpful. Thanks!

    HTML Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    
    "http://www.w3.org/TR/html4/loose.dtd">
    
    <html>
    
    <head>
    
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    
    <title>k a t e  L  p h o t o g r a p h y</title>
    
    <style type="text/css">
    
    <!--
    
    body {
    
    	background-color: #FFFFFF;
    
    }
    
    .style6 {
    
    	color: #D9ECBB;
    
    	font-size: x-small;
    
    }
    
    .style11 {color: #DEF0C6; font-family: Arial, Helvetica, sans-serif;}
    
    -->
    
    </style>
    
    </head>
    
    
    <body background="http://img360.imageshack.us/img360/9241/backgroundmo6.jpg">
    
    <div align="center"><br>
    
      <br>
    
      <br>
    
      <br>
      <img src="http://img119.imageshack.us/img119/8839/71647178vd9.jpg" width="934" height="679" border="0" usemap="#Map"> 
      <map name="Map">
        <area shape="rect" coords="-6,251,92,266" href="photogs.htm">
    
      <area shape="rect" coords="-4,230,95,246" href="me.htm">
    
      <area shape="rect" coords="0,291,92,307" href="pricetag.htm">
    
      </map>
    
    <br>
    
    <br>
    
    <br>
      <span class="style6"></span></div>
    </body>
    
    </html>

  2. #2
    Join Date
    Sep 2007
    Location
    The Netherlands
    Posts
    1,881
    Thanks
    49
    Thanked 266 Times in 258 Posts
    Blog Entries
    56

    Default

    body{overflow:hidden}
    ----
    Arie Molendijk.

  3. #3
    Join Date
    Feb 2008
    Location
    Cebu City Philippines
    Posts
    1,160
    Thanks
    17
    Thanked 277 Times in 275 Posts

    Default

    Having overflow:hidden; will solve the vertical scrollbar only,..and on the dark side, this will cut off the image.

    I thought that removing the <br> tags would aide,

    ...Also set the body's margin:
    Code:
    body {
    margin:1px;
    background-color: #FFFFFF;
    }
    ...Still a scrollbar is shown,, no choice but to limit the image's height

    ...Or as what molendijk suggested, adding overflow:hidden; will fix it, though has some ill effects
    Learn how to code at 02geek

    The more you learn, the more you'll realize there's much more to learn
    Ray.ph!

Bookmarks

Posting Permissions

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