Click here to get back home

Footer only to maintain background

 HomeNewsGroups | Search | About
 comp.infosystems.www.authoring.html    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
Footer only to maintain background Doug Laidlaw 11-10-2007
Posted by Doug Laidlaw on November 10, 2007, 9:49 am
Please log in for more thread options
I have re-styled my Web site at http://www.douglaidlaw.net/boykett/ . It
now uses a CSS stylesheet basically copied from "Beginning CSS Web
Development" with a fluid main content area, and passes the validator for
HTML 4.01 (except api_sample.html. I tried to get the XHTML out of that,
but Kompozer kept putting it back till I gave up. It isn't part of the
main stream of the site, more like an aside, and it looks O.K. in XP's
Internet Explorer.)

My query is about the footer. On the start page, index.html, it has
content. On other pages, if I took it out, the background color in the
Main div would not come down far enough, stopping a short distance below
the header, so I left it in. That sounds to me as though it just should
not happen. What is wrong?

TIA,

Doug.

Posted by Bergamot on November 10, 2007, 12:55 pm
Please log in for more thread options
Doug Laidlaw wrote:
> http://www.douglaidlaw.net/boykett/
>
> My query is about the footer. On the start page, index.html, it has
> content. On other pages, if I took it out, the background color in the
> Main div would not come down far enough

This is VFAQ. Read up on the "clear" property. And see
http://www.quirksmode.org/css/clearing.html

BTW, your layout is not as fluid as you think. Try setting your browser
window to about 800px wide. The trouble is

#content {
width: 80%;
padding: 10px;
}

#sidebar {
width: 15%;
padding: 10px;
}

Padding is added to the width. That extra 40px puts it over 100% when
the window isn't as large as you expect. I'd drop the padding
altogether. I'd drop floating #content, too, and just set a left margin
to clear the navigation menu. That would take care of stretching the
background color, as well.

But why don't you set background color on the body element instead?

--
Berg

Posted by Doug Laidlaw on November 10, 2007, 8:30 pm
Please log in for more thread options
Bergamot wrote:

> Doug Laidlaw wrote:
>> http://www.douglaidlaw.net/boykett/
>>
>> My query is about the footer. On the start page, index.html, it has
>> content. On other pages, if I took it out, the background color in the
>> Main div would not come down far enough
>
> This is VFAQ. Read up on the "clear" property. And see
> http://www.quirksmode.org/css/clearing.html
>
> BTW, your layout is not as fluid as you think. Try setting your browser
> window to about 800px wide. The trouble is
>
> #content {
> width: 80%;
> padding: 10px;
> }
>
> #sidebar {
> width: 15%;
> padding: 10px;
> }
>
> Padding is added to the width. That extra 40px puts it over 100% when
> the window isn't as large as you expect. I'd drop the padding
> altogether. I'd drop floating #content, too, and just set a left margin
> to clear the navigation menu. That would take care of stretching the
> background color, as well.
>
> But why don't you set background color on the body element instead?
>
Slavishly following a precedent or precedents. That is the problem with
being a self-taught amateur. I am so used to <body bgcolor= >.

Actually, moving the background-color to the <body> tag in the stylesheet
made the whole screen take the color. That is what I really wanted, but I
expected that it would be restricted to the defined area, and leave the
external margins white (or browser default) as the container does, for
example. Probably a result of not thinking logically one step at a time.

Thanks for your other tips as well. I will adopt them all. Looking at it,
40px does seem a lot. The left margin really needs to be fixed, not
percentage. Is the way I have created the third column on index.html O.K.?
I would like eventually to make the pages into an e-book, but that is long
term, and different considerations will arise.

Doug.

Posted by Doug Laidlaw on November 10, 2007, 10:44 pm
Please log in for more thread options
Doug Laidlaw wrote:

> Bergamot wrote:
>
>> Doug Laidlaw wrote:
>>> http://www.douglaidlaw.net/boykett/
>>>
>>> My query is about the footer. On the start page, index.html, it has
>>> content. On other pages, if I took it out, the background color in the
>>> Main div would not come down far enough
>>
>> This is VFAQ. Read up on the "clear" property. And see
>> http://www.quirksmode.org/css/clearing.html
>>
>> BTW, your layout is not as fluid as you think. Try setting your browser
>> window to about 800px wide. The trouble is
>>
>> #content {
>> width: 80%;
>> padding: 10px;
>> }
>>
>> #sidebar {
>> width: 15%;
>> padding: 10px;
>> }
>>
>> Padding is added to the width. That extra 40px puts it over 100% when
>> the window isn't as large as you expect. I'd drop the padding
>> altogether. I'd drop floating #content, too, and just set a left margin
>> to clear the navigation menu. That would take care of stretching the
>> background color, as well.
>>
>> But why don't you set background color on the body element instead?
>>
> Slavishly following a precedent or precedents. That is the problem with
> being a self-taught amateur. I am so used to <body bgcolor= >.
>
> Actually, moving the background-color to the <body> tag in the stylesheet
> made the whole screen take the color. That is what I really wanted, but I
> expected that it would be restricted to the defined area, and leave the
> external margins white (or browser default) as the container does, for
> example. Probably a result of not thinking logically one step at a time.
>
> Thanks for your other tips as well. I will adopt them all. Looking at
> it,
> 40px does seem a lot. The left margin really needs to be fixed, not
> percentage. Is the way I have created the third column on index.html
> O.K.? I would like eventually to make the pages into an e-book, but that
> is long term, and different considerations will arise.
>
> Doug.
But if I delete all padding, and with no footer, the content wraps around
the links column.

Doug.

Posted by Bergamot on November 11, 2007, 1:50 am
Please log in for more thread options
Doug Laidlaw wrote:
>> Bergamot wrote:
>>> Doug Laidlaw wrote:
>>>> http://www.douglaidlaw.net/boykett/
>>>
>>> I'd drop floating #content, too, and just set a left margin
>>> to clear the navigation menu.
>>
> But if I delete all padding, and with no footer, the content wraps around
> the links column.

You need to set margin-left on the content container. Make it a little
more than the width of the navigation menu.

--
Berg

Similar ThreadsPosted
Footer? March 25, 2006, 12:58 pm
header an footer August 2, 2006, 5:00 pm
Header AND Footer? February 18, 2008, 4:09 am
Keeping the footer at the bottom April 25, 2008, 8:09 pm
Header, Footer, Content Layout using DIV and CSS? August 19, 2006, 7:32 am
How to position a "footer" div? (Aligning with "bottom:0" aligns to the viewport and not to the containing element :-( ) February 19, 2007, 3:22 am
Background images January 25, 2005, 5:19 pm
with background image - what's the right way? March 4, 2005, 5:51 pm
Cannot set background color (XML+CSS) July 6, 2005, 12:16 am
How to make background img fit June 28, 2006, 10:01 am

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap