Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Dreamweaver topmargin=0 not working

Status
Not open for further replies.

fluidkid

Technical User
Sep 17, 2008
2
US
Hello all, I am new to dreamweaver, and I apologize for such a seemingly dumb question... I cant get the topmargin=0 to work in CS4

I have checked the CSS rules for body and container, in fact everywhere i can see that makes sense, and they are all set to 0.. the page looks like it has 0 topmargin in Dreaweaver, but when I preview in a browser, it has a margin! This is driving me crazy, I know it must be something simple...

Here is a cut n paste of the code from my style sheet, maybe someone will notice my error.... I have also set the topmargin=0 in the <body> tag, and it doesn't seem to be working...

Thanks so much in advance!

@charset "UTF-8";
body {
background-color: #000;
text-align: center;
margin-top: 0px;
background-image: url(images/back.gif);
}
#container {
background-color: #FFF;
height: 1200px;
width: 800px;
margin-right: auto;
margin-left: auto;
position: relative;
text-align: left;
vertical-align: top;
margin-top: 0px;
border-right-style: solid;
border-left-style: solid;
border-right-width: thick;
border-left-width: thick;
}
#header {
position:absolute;
left:0px;
top:0px;
width:800px;
height:175px;
z-index:1;
background-image: url(images/head.jpg);
font-family: Verdana, Geneva, sans-serif;
font-size: 12px;
font-weight: bold;
text-align: right;
}
#main {
position:absolute;
left:0px;
top:176px;
width:800px;
height:793px;
z-index:1;
text-align: center;
background-color: #FFF;
font-family: Verdana, Geneva, sans-serif;
}
#main p a {
font-family: Verdana, Geneva, sans-serif;
font-size: 9px;
background-color: #FFF;
text-align: right;
}
#footer {
position:absolute;
left:0px;
width:800px;
height:175px;
z-index:2;
background-image: url(images/foot.jpg);
bottom: 0px;
}
#details {
position:absolute;
left:55px;
top:441px;
width:673px;
height:258px;
z-index:1;
font-family: Verdana, Geneva, sans-serif;
font-size: 12px;
background-color: #CCC;
text-align: left;
vertical-align: top;
padding: 10px;
border: thin dotted #333;
}
 
What about padding?

Search for reset css to get a little background on this.

Greg
People demand freedom of speech as a compensation for the freedom of thought which they seldom use. Kierkegaard
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top