You are here: Re: Position: Absolute Removes Background? « HTML « IT news, forums, messages
Re: Position: Absolute Removes Background?

Posted by David Dorward on 11/25/01 11:47

Bill wrote:

> I just started learning about div tags today.

Not much to learn, "Its a block element. It has no semantics".

> The following works as I'd expect it to in IE, but in FF the
> background isn't displayed in the "header". If I remove
> "position:absolute;" from div#header, then the background is displayed
> in FF.

> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

XHTML? Not a great idea.

> <HTML>

And not valid XHTML at that.

> div#wrapper{
> background:url('textbg.jpg') repeat-y;
> height:auto;
> }

Since you set the only child element to position: absolute, it no longer has
any influence over the height of the wrapper. This causes the effective
height to be 0. The background is set, but there is nothing to display it
on.

--
David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
Home is where the ~/.bashrc is

 

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

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