PDA

View Full Version : Top not really Top



mbingham666
Aug 18th, 2007, 03:16 AM
This may be a really simple question, but i can't find the answer to this anywhere. Also I'm pretty new to CSS, and brand new to the forums, so take it easy on me.

How do I get my Container to sit at the tip tippity tip top edge of the page?>!?!

here's what I have.

[CSS]

body {
background-image: url(images/background.jpg);
background-repeat: no-repeat;
background-position: center;
background-position: top;
background-color:#FFFFFF;
text-align: center;
font: "Dutch801 Rm BT";
}
#container {
margin: 0 auto;
padding:0;
width: 704px;
margin-top: 0px;
text-align: left;

}
#form {
width: 150px;
margin: 0;
height: 20px;
position:relative;
left: 0px;
top: 0px;
visibility: visible;
}
-->
</style>

and the html

[HTML]

<body>
<div id="container">
<div class="style1" id="form">Top</div>
</div>
</body>


In IE the top of my container sits about 3px from the top. What am I missing.

mbingham666
Aug 18th, 2007, 03:50 AM
Nevermind, got it.

I was putting the margin:0 and padding:0 in the #container, and leaving it out of the body

effpeetee
Aug 18th, 2007, 11:53 AM
I'm not an expert with css; but should you not put a more comprehensive font selection here. What happens if the receiver doesn't have this font? Or am I missing something?

Frank

body {
background-image: url(images/background.jpg);
background-repeat: no-repeat;
background-position: center;
background-position: top;
background-color:#FFFFFF;
text-align: center;
font: "Dutch801 Rm BT";

Jutlander
Aug 18th, 2007, 12:09 PM
. What happens if the receiver doesn't have this font?

Then the browser will switch back to the default, which is Times New Roman if you haven't changed it to something else.