You are here: Re: What's with it anyway? Div inside a div « HTML « IT news, forums, messages
Re: What's with it anyway? Div inside a div

Posted by Matt White on 08/13/07 16:23

On Aug 13, 9:17 am, greenflame <dynamic.e...@gmail.com> wrote:
> ok, so here's the deal.
> I have a div, which is adjusted to 100% width and 100% height.
> I have another div inside (which is relative to it)
> Problem is that the outer div is adjusting to the height and width of
> the inner div. It's driving me mad.
> I tried to play with z-index, with overflow:hidden... nothing. maybe
> you can help me.
>
> (using windows xp, internet explorer if it matters)
> Here's the code:
>
> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
> <html xmlns="http://www.w3.org/1999/xhtml">
> <head>
> <meta http-equiv="Content-Type" content="text/html;
> charset=iso-8859-1" />
> <title>Ardeo Design Studios</title>
> <style type="text/css">
> body,p,tr,td {
> font-family:Geneva, Arial, Helvetica, sans-serif;
> font-size:17px;
>
> }
>
> .container {
> /*z-index:1;*/
> position:absolute;
> top:0px;
> left:0px;
> width:100%;
> height:100%;
> border:5px solid #ffffff;
>
> }
>
> .bgWords {
> background-color:#99CCFF;
> font-weight:bold; font-size:36px; color:#212121;
> position:relative; top:50; left:50;
> width:50%; height:150px; line-height:30px;
> /* for IE */ filter:alpha(opacity=40);
> /* CSS3 standard */ opacity:0.4;
> /* for Mozilla */ -moz-opacity:0.4;
> /*overflow:hidden; */
> border:1px solid #ffffff;}
>
> </style>
> </head>
>
> <body bgcolor="#333333">
> <div class="container">
>
> <div class="bgWords">
> aaaa aaaa aaaa baba baba baba caca caca caca dada dada dada eaea eaea
> eaea fafa fafa fafa gaga gaga gaga haha haha haha iaia iaia iaia jaja
> jaja jaja kaka kaka kaka lala lala lala mama mama mama nana nana nana
> oaoa oaoa oaoa papa papa papa qaqa qaqa qaqa rara rara rara sasa sasa
> sasa tata tata tata uaua uaua uaua uaua vava vava vava wawa wawa wawa
> xaxa xaxa xaxa yaya yaya yaya zaza zaza zaza sometext sometext
> sometext sometext
> </div>
>
> </div>
> </body>
> </html>

Try reversing the position attribute on bgwords and container, so that
bgwords is absolute and container is relative. Is that what you want?

 

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

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