HighDots Forums  

DW8, CSS layout presets. Always a top padding/margin.How to remove?

Macromedia Dreamweaver Macromedia Dreamweaver Discussions (macromedia.dreamweaver)


Discuss DW8, CSS layout presets. Always a top padding/margin.How to remove? in the Macromedia Dreamweaver forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
synterx
 
Posts: n/a

Default DW8, CSS layout presets. Always a top padding/margin.How to remove? - 06-04-2008 , 11:37 AM






This is driving me crazy. I am building a quick down and dirty site. I chose
one of the preset CSS layouts, a simple 1 column centered layout (1 Column,
Fixed). There is one "container" div, as expected, and a Main Body div inside
that. However, the Main Body div is about 1/4" down from the top. Yet, I went
through all the CSS stuff and nothing is set to have a top margin, top padding,
nothing, of anything other than 0. I haven't even begun adding content, this is
just with the basic page DW gives you.

It's not just this one preset layout, but with all of them. Does anyone have
any idea how to get this to the top? I know, I know, I could scrap the presets
and just do it, but I like the presets for quick designs, they are very nice.

@charset "UTF-8";
body {
margin: 0; /* it's good practice to zero the margin and padding of the body
element to account for differing browser defaults */
padding: 0;
text-align: center; /* this centers the container in IE 5* browsers. The text
is then set to the left aligned default in the #container selector */
color: #000000;
background-color: #3366FF;
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 14px;
}
.oneColFixCtr #container {
width: 780px;
margin: 0 auto; /* the auto margins (in conjunction with a width) center the
page */
border: 1px solid #000000;
text-align: left; /* this overrides the text-align: center on the body
element. */
background-color: #FFFFFF;
background-repeat: no-repeat;
top: 0px;
}
.oneColFixCtr #mainContent {
padding-right: 20px;
padding-bottom: 0;
padding-left: 20px;
top: 0px;
}
body,td,th {
font-size: 14pt;
}
a:link {
color: #0066FF;
text-decoration: none;
}
a:visited {
text-decoration: none;
color: #0099FF;
}
a:hover {
text-decoration: underline;
color: #FF9900;
}
a:active {
text-decoration: none;
color: #0066FF;
}
h1 {
font-size: 28px;
color: #FF9900;
}
h2 {
font-size: 22px;
color: #000000;
}
h3 {
font-size: 16px;
color: #000000;
}


Reply With Quote
  #2  
Old   
Murray *ACE*
 
Posts: n/a

Default Re: DW8, CSS layout presets. Always a top padding/margin. How to remove? - 06-04-2008 , 11:45 AM






What is the first CHILD tag of the Main body div? Have you controlled the
top margin on that tag?

--
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
==================


"synterx" <webforumsuser (AT) macromedia (DOT) com> wrote

Quote:
This is driving me crazy. I am building a quick down and dirty site. I
chose
one of the preset CSS layouts, a simple 1 column centered layout (1
Column,
Fixed). There is one "container" div, as expected, and a Main Body div
inside
that. However, the Main Body div is about 1/4" down from the top. Yet, I
went
through all the CSS stuff and nothing is set to have a top margin, top
padding,
nothing, of anything other than 0. I haven't even begun adding content,
this is
just with the basic page DW gives you.

It's not just this one preset layout, but with all of them. Does anyone
have
any idea how to get this to the top? I know, I know, I could scrap the
presets
and just do it, but I like the presets for quick designs, they are very
nice.

@charset "UTF-8";
body {
margin: 0; /* it's good practice to zero the margin and padding of the
body
element to account for differing browser defaults */
padding: 0;
text-align: center; /* this centers the container in IE 5* browsers. The
text
is then set to the left aligned default in the #container selector */
color: #000000;
background-color: #3366FF;
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 14px;
}
.oneColFixCtr #container {
width: 780px;
margin: 0 auto; /* the auto margins (in conjunction with a width) center
the
page */
border: 1px solid #000000;
text-align: left; /* this overrides the text-align: center on the body
element. */
background-color: #FFFFFF;
background-repeat: no-repeat;
top: 0px;
}
.oneColFixCtr #mainContent {
padding-right: 20px;
padding-bottom: 0;
padding-left: 20px;
top: 0px;
}
body,td,th {
font-size: 14pt;
}
a:link {
color: #0066FF;
text-decoration: none;
}
a:visited {
text-decoration: none;
color: #0099FF;
}
a:hover {
text-decoration: underline;
color: #FF9900;
}
a:active {
text-decoration: none;
color: #0066FF;
}
h1 {
font-size: 28px;
color: #FF9900;
}
h2 {
font-size: 22px;
color: #000000;
}
h3 {
font-size: 16px;
color: #000000;
}



Reply With Quote
  #3  
Old   
Murray *ACE*
 
Posts: n/a

Default Re: DW8, CSS layout presets. Always a top padding/margin. How to remove? - 06-04-2008 , 11:45 AM



What is the first CHILD tag of the Main body div? Have you controlled the
top margin on that tag?

--
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
==================


"synterx" <webforumsuser (AT) macromedia (DOT) com> wrote

Quote:
This is driving me crazy. I am building a quick down and dirty site. I
chose
one of the preset CSS layouts, a simple 1 column centered layout (1
Column,
Fixed). There is one "container" div, as expected, and a Main Body div
inside
that. However, the Main Body div is about 1/4" down from the top. Yet, I
went
through all the CSS stuff and nothing is set to have a top margin, top
padding,
nothing, of anything other than 0. I haven't even begun adding content,
this is
just with the basic page DW gives you.

It's not just this one preset layout, but with all of them. Does anyone
have
any idea how to get this to the top? I know, I know, I could scrap the
presets
and just do it, but I like the presets for quick designs, they are very
nice.

@charset "UTF-8";
body {
margin: 0; /* it's good practice to zero the margin and padding of the
body
element to account for differing browser defaults */
padding: 0;
text-align: center; /* this centers the container in IE 5* browsers. The
text
is then set to the left aligned default in the #container selector */
color: #000000;
background-color: #3366FF;
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 14px;
}
.oneColFixCtr #container {
width: 780px;
margin: 0 auto; /* the auto margins (in conjunction with a width) center
the
page */
border: 1px solid #000000;
text-align: left; /* this overrides the text-align: center on the body
element. */
background-color: #FFFFFF;
background-repeat: no-repeat;
top: 0px;
}
.oneColFixCtr #mainContent {
padding-right: 20px;
padding-bottom: 0;
padding-left: 20px;
top: 0px;
}
body,td,th {
font-size: 14pt;
}
a:link {
color: #0066FF;
text-decoration: none;
}
a:visited {
text-decoration: none;
color: #0099FF;
}
a:hover {
text-decoration: underline;
color: #FF9900;
}
a:active {
text-decoration: none;
color: #0066FF;
}
h1 {
font-size: 28px;
color: #FF9900;
}
h2 {
font-size: 22px;
color: #000000;
}
h3 {
font-size: 16px;
color: #000000;
}



Reply With Quote
  #4  
Old   
Nancy
 
Posts: n/a

Default Re: DW8, CSS layout presets. Always a top padding/margin. How to remove? - 06-04-2008 , 11:50 AM



It's the paragraph tag at the beginning ot the sample text. You can define
your paragraph tag in the main content div to have no top margin .. keep in
mind that will affect all paragraphs in the div.

..oneColFixCtr #container #mainContent p {
margin: 0px;
padding: 0px;

or you can simply remove the opening paragraph tag on the sample text.

Nancy

"synterx" <webforumsuser (AT) macromedia (DOT) com> wrote

Quote:
This is driving me crazy. I am building a quick down and dirty site. I
chose
one of the preset CSS layouts, a simple 1 column centered layout (1
Column,
Fixed). There is one "container" div, as expected, and a Main Body div
inside
that. However, the Main Body div is about 1/4" down from the top. Yet, I
went
through all the CSS stuff and nothing is set to have a top margin, top
padding,
nothing, of anything other than 0. I haven't even begun adding content,
this is
just with the basic page DW gives you.

It's not just this one preset layout, but with all of them. Does anyone
have
any idea how to get this to the top? I know, I know, I could scrap the
presets
and just do it, but I like the presets for quick designs, they are very
nice.

@charset "UTF-8";
body {
margin: 0; /* it's good practice to zero the margin and padding of the
body
element to account for differing browser defaults */
padding: 0;
text-align: center; /* this centers the container in IE 5* browsers. The
text
is then set to the left aligned default in the #container selector */
color: #000000;
background-color: #3366FF;
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 14px;
}
.oneColFixCtr #container {
width: 780px;
margin: 0 auto; /* the auto margins (in conjunction with a width) center
the
page */
border: 1px solid #000000;
text-align: left; /* this overrides the text-align: center on the body
element. */
background-color: #FFFFFF;
background-repeat: no-repeat;
top: 0px;
}
.oneColFixCtr #mainContent {
padding-right: 20px;
padding-bottom: 0;
padding-left: 20px;
top: 0px;
}
body,td,th {
font-size: 14pt;
}
a:link {
color: #0066FF;
text-decoration: none;
}
a:visited {
text-decoration: none;
color: #0099FF;
}
a:hover {
text-decoration: underline;
color: #FF9900;
}
a:active {
text-decoration: none;
color: #0066FF;
}
h1 {
font-size: 28px;
color: #FF9900;
}
h2 {
font-size: 22px;
color: #000000;
}
h3 {
font-size: 16px;
color: #000000;
}




Reply With Quote
  #5  
Old   
Nancy
 
Posts: n/a

Default Re: DW8, CSS layout presets. Always a top padding/margin. How to remove? - 06-04-2008 , 11:50 AM



It's the paragraph tag at the beginning ot the sample text. You can define
your paragraph tag in the main content div to have no top margin .. keep in
mind that will affect all paragraphs in the div.

..oneColFixCtr #container #mainContent p {
margin: 0px;
padding: 0px;

or you can simply remove the opening paragraph tag on the sample text.

Nancy

"synterx" <webforumsuser (AT) macromedia (DOT) com> wrote

Quote:
This is driving me crazy. I am building a quick down and dirty site. I
chose
one of the preset CSS layouts, a simple 1 column centered layout (1
Column,
Fixed). There is one "container" div, as expected, and a Main Body div
inside
that. However, the Main Body div is about 1/4" down from the top. Yet, I
went
through all the CSS stuff and nothing is set to have a top margin, top
padding,
nothing, of anything other than 0. I haven't even begun adding content,
this is
just with the basic page DW gives you.

It's not just this one preset layout, but with all of them. Does anyone
have
any idea how to get this to the top? I know, I know, I could scrap the
presets
and just do it, but I like the presets for quick designs, they are very
nice.

@charset "UTF-8";
body {
margin: 0; /* it's good practice to zero the margin and padding of the
body
element to account for differing browser defaults */
padding: 0;
text-align: center; /* this centers the container in IE 5* browsers. The
text
is then set to the left aligned default in the #container selector */
color: #000000;
background-color: #3366FF;
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 14px;
}
.oneColFixCtr #container {
width: 780px;
margin: 0 auto; /* the auto margins (in conjunction with a width) center
the
page */
border: 1px solid #000000;
text-align: left; /* this overrides the text-align: center on the body
element. */
background-color: #FFFFFF;
background-repeat: no-repeat;
top: 0px;
}
.oneColFixCtr #mainContent {
padding-right: 20px;
padding-bottom: 0;
padding-left: 20px;
top: 0px;
}
body,td,th {
font-size: 14pt;
}
a:link {
color: #0066FF;
text-decoration: none;
}
a:visited {
text-decoration: none;
color: #0099FF;
}
a:hover {
text-decoration: underline;
color: #FF9900;
}
a:active {
text-decoration: none;
color: #0066FF;
}
h1 {
font-size: 28px;
color: #FF9900;
}
h2 {
font-size: 22px;
color: #000000;
}
h3 {
font-size: 16px;
color: #000000;
}




Reply With Quote
  #6  
Old   
synterx
 
Posts: n/a

Default Re: DW8, CSS layout presets. Always a toppadding/margin. How to remove? - 06-04-2008 , 11:53 AM



I found if I set the Main Body div to "relative", the 20pix gap at the top
disappeared. The one at the bottom however, remains. I can live with that. The
other odd thing, is the dummy text DW puts in the main body div of the preset
layout does not start at the top either. It's a good 20 pixels down. Again, I
see nowhere that a top padding or margin is set. Is there some type of
"generic" margins in CSS that I don't know about? Something I have to somehow
manually override?

If I have a div, and there are no margins or padding anywhere, then I expect
the text to start at the top left corner always. Doesn't seem to be the case.

I'm looking for any and all insights into this oddity. Thank you.


Reply With Quote
  #7  
Old   
synterx
 
Posts: n/a

Default Re: DW8, CSS layout presets. Always a toppadding/margin. How to remove? - 06-04-2008 , 11:53 AM



I found if I set the Main Body div to "relative", the 20pix gap at the top
disappeared. The one at the bottom however, remains. I can live with that. The
other odd thing, is the dummy text DW puts in the main body div of the preset
layout does not start at the top either. It's a good 20 pixels down. Again, I
see nowhere that a top padding or margin is set. Is there some type of
"generic" margins in CSS that I don't know about? Something I have to somehow
manually override?

If I have a div, and there are no margins or padding anywhere, then I expect
the text to start at the top left corner always. Doesn't seem to be the case.

I'm looking for any and all insights into this oddity. Thank you.


Reply With Quote
  #8  
Old   
Murray *ACE*
 
Posts: n/a

Default Re: DW8, CSS layout presets. Always a top padding/margin. How to remove? - 06-04-2008 , 12:17 PM



Quote:
I found if I set the Main Body div to "relative", the 20pix gap at the top
disappeared.
Yes, but not for the reasons you think. In general, randomly setting things
to various values of positioning is a great way to thoroughly confuse
yourself, wreck the page, and rack up demerits in the logbook in the sky.

Quote:
If I have a div, and there are no margins or padding anywhere, then I
expect
the text to start at the top left corner always. Doesn't seem to be the
case.
For exactly the reasons stated you your other recent replies. You are not
seeing margin on the div tag at all.

--
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
==================


"synterx" <webforumsuser (AT) macromedia (DOT) com> wrote

Quote:
I found if I set the Main Body div to "relative", the 20pix gap at the top
disappeared. The one at the bottom however, remains. I can live with that.
The
other odd thing, is the dummy text DW puts in the main body div of the
preset
layout does not start at the top either. It's a good 20 pixels down.
Again, I
see nowhere that a top padding or margin is set. Is there some type of
"generic" margins in CSS that I don't know about? Something I have to
somehow
manually override?

If I have a div, and there are no margins or padding anywhere, then I
expect
the text to start at the top left corner always. Doesn't seem to be the
case.

I'm looking for any and all insights into this oddity. Thank you.



Reply With Quote
  #9  
Old   
Murray *ACE*
 
Posts: n/a

Default Re: DW8, CSS layout presets. Always a top padding/margin. How to remove? - 06-04-2008 , 12:17 PM



Quote:
I found if I set the Main Body div to "relative", the 20pix gap at the top
disappeared.
Yes, but not for the reasons you think. In general, randomly setting things
to various values of positioning is a great way to thoroughly confuse
yourself, wreck the page, and rack up demerits in the logbook in the sky.

Quote:
If I have a div, and there are no margins or padding anywhere, then I
expect
the text to start at the top left corner always. Doesn't seem to be the
case.
For exactly the reasons stated you your other recent replies. You are not
seeing margin on the div tag at all.

--
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
==================


"synterx" <webforumsuser (AT) macromedia (DOT) com> wrote

Quote:
I found if I set the Main Body div to "relative", the 20pix gap at the top
disappeared. The one at the bottom however, remains. I can live with that.
The
other odd thing, is the dummy text DW puts in the main body div of the
preset
layout does not start at the top either. It's a good 20 pixels down.
Again, I
see nowhere that a top padding or margin is set. Is there some type of
"generic" margins in CSS that I don't know about? Something I have to
somehow
manually override?

If I have a div, and there are no margins or padding anywhere, then I
expect
the text to start at the top left corner always. Doesn't seem to be the
case.

I'm looking for any and all insights into this oddity. Thank you.



Reply With Quote
  #10  
Old   
Virginia Carter
 
Posts: n/a

Default Re: DW8, CSS layout presets. Always a top padding/margin. How toremove? - 06-04-2008 , 12:19 PM



All paragraph tags and header tags have inherent margins. You won't
'see' those anywhere. They are just 'there'. It's always a good idea to
zero out all your margins and paddings from the beginning, when you
start building a site.

I don't think using position:relative is a good way to 'fix' alignment
issues on your page. In the long run, you would be better off finding
out WHY it is not where you want it, and then address that. That's much
less likely to cause issues later on.



synterx wrote:
Quote:
I found if I set the Main Body div to "relative", the 20pix gap at the top
disappeared. The one at the bottom however, remains. I can live with that. The
other odd thing, is the dummy text DW puts in the main body div of the preset
layout does not start at the top either. It's a good 20 pixels down. Again, I
see nowhere that a top padding or margin is set. Is there some type of
"generic" margins in CSS that I don't know about? Something I have to somehow
manually override?

If I have a div, and there are no margins or padding anywhere, then I expect
the text to start at the top left corner always. Doesn't seem to be the case.

I'm looking for any and all insights into this oddity. Thank you.


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.