You are here: Re: IE6 and second class in CSS « HTML « IT news, forums, messages
Re: IE6 and second class in CSS

Posted by Beauregard T. Shagnasty on 07/26/07 16:43

pablopatito wrote:

> I have the following page which seems to work in all browsers except
> IE6. In IE6, the second class (myclass2) is ignored, but the first
> class works fine. Is there something wrong with my code, or is there
> a workaround. Any advise for a relative novice would be much
> appreciated.

Do you have this working on a web server? Provide a URL.

> <style>
> #mainbody {background: red;width:600px}
> #mainbody.myclass1 {background: yellow;width:300px}
> #mainbody.myclass2 {background: green;width:300px}
> </style>
>
> <div id="mainBody">Hello</div>
>
> <div id="mainBody" class="myclass1">World</div>
>
> <div id="mainBody" class="myclass2">World</div>

An id is only permitted once on a page. You would notice this at:
http://validator.w3.org/

Why don't you wrap all your content in one div which uses the
id="mainBody" ?

--
-bts
-Motorcycles defy gravity; cars just suck

 

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

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