Log in

View Full Version : trouble with DIV placement



lemmonkat
04-06-2008, 03:36 PM
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!


<!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>

molendijk
04-06-2008, 06:15 PM
body{overflow:hidden}
----
Arie Molendijk.

rangana
04-07-2008, 02:08 AM
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:


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 :)