You are here: Re: vertical scrolling + margin-bottom « HTML « IT news, forums, messages
Re: vertical scrolling + margin-bottom

Posted by dorayme on 01/01/08 20:53

In article
<386bbc3e-3b81-4478-a527-a09619ebf27f@f3g2000hsg.googlegroups.com
>,
Bazley <jmp6789@hotmail.com> wrote:

> I have added margin-bottom: 30px; to the 'main' div (all code below),
> in an attempt to leave 30 px permanently at the bottom of the page.
> But when the content of the main div extends beyond the bottom of the
> screen and a scroll bar appears, it stops scrolling after the border
> of main and ignores the margin. What's the problem? Thanks!
>
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 transitional//EN"
....
> <div id="main">
>
> help<br>
>

I last snip your doc at the point it goes wrong. Why bother with
XHTML anyway?

But let us not quibble; more importantly, why so much specifying
for heights? Try this simpler variation:

body {background: black;}

#main {
margin: auto;
margin-top: 15px;
margin-bottom: 30px;
width: 300px;
min-height: 750px;
border: 5px solid aqua;
background-color: teal;
}

and use <br /> with your doctype.

--
dorayme

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация