IE6 and second class in CSS
IE6 and second class in CSS
am 26.07.2007 18:01:49 von pablopatito
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.
Hello
World
World
Re: IE6 and second class in CSS
am 26.07.2007 18:43:28 von a.nony.mous
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.
>
>
>
Hello
>
> World
>
> World
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
Re: IE6 and second class in CSS
am 26.07.2007 23:31:55 von dorayme
In article
<1185465709.765842.24560@22g2000hsm.googlegroups.com>,
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.
>
>
>
>
> Hello
>
> World
>
> World
Try lower case in the html to match the css.
--
dorayme
Re: IE6 and second class in CSS
am 27.07.2007 10:09:49 von pablopatito
On 26 Jul, 17:43, "Beauregard T. Shagnasty"
wrote:
> Do you have this working on a web server? Provide a URL.
Here is an example:
http://jns.shared.hosting.zen.co.uk/tmp/page1.htm
http://jns.shared.hosting.zen.co.uk/tmp/page2.htm
Page 1 works in IE6, but page 2 doesn't. This is because page 1 uses
the first class, and page 2 uses the second class. Both work fine in
other browsers. Thanks for your help.
Re: IE6 and second class in CSS
am 27.07.2007 12:57:04 von Neredbojias
Well bust mah britches and call me cheeky, on Fri, 27 Jul 2007 08:09:49 GMT
pablopatito scribed:
> On 26 Jul, 17:43, "Beauregard T. Shagnasty"
> wrote:
>> Do you have this working on a web server? Provide a URL.
>
> Here is an example:
> http://jns.shared.hosting.zen.co.uk/tmp/page1.htm
> http://jns.shared.hosting.zen.co.uk/tmp/page2.htm
>
> Page 1 works in IE6, but page 2 doesn't. This is because page 1 uses
> the first class, and page 2 uses the second class. Both work fine in
> other browsers. Thanks for your help.
All the other browsers are wrong. IE6 is right.
#myid .myclass { something } refers to:
--
Neredbojias
Half lies are worth twice as much as whole lies.
Re: IE6 and second class in CSS
am 27.07.2007 12:58:29 von John Hosking
pablopatito wrote:
> On 26 Jul, 17:43, "Beauregard T. Shagnasty" wrote:
>> Do you have this working on a web server? Provide a URL.
>
> Here is an example:
> http://jns.shared.hosting.zen.co.uk/tmp/page1.htm
> http://jns.shared.hosting.zen.co.uk/tmp/page2.htm
>
> Page 1 works in IE6, but page 2 doesn't. This is because page 1 uses
> the first class, and page 2 uses the second class. Both work fine in
> other browsers. Thanks for your help.
See http://isaacschlueter.com/2006/03/ie-multi-selector-bug/
and
http://www.quirksmode.org/bugreports/archives/2006/04/CSS_Bu g_in_MSIE_6_Selector_with_an_ID_and_a_Class_.html
(or for a non-wrapped version of second link above:
http://preview.tinyurl.com/ywvqmm )
Pablo, if you have more questions about CSS, subscribe to
comp.infosystems.www.authoring.stylesheets
--
John
Re: IE6 and second class in CSS
am 27.07.2007 13:56:46 von a.nony.mous
pablopatito wrote:
> "Beauregard T. Shagnasty" wrote:
>> Do you have this working on a web server? Provide a URL.
>
> Here is an example:
> http://jns.shared.hosting.zen.co.uk/tmp/page1.htm
> http://jns.shared.hosting.zen.co.uk/tmp/page2.htm
>
> Page 1 works in IE6, but page 2 doesn't. This is because page 1 uses
> the first class, and page 2 uses the second class. Both work fine in
> other browsers. Thanks for your help.
I got your sample code to work as expected by correcting the CASE of
your ID, as already mentioned by someone else,
from
to
--
-bts
-Motorcycles defy gravity; cars just suck
Re: IE6 and second class in CSS
am 27.07.2007 15:09:59 von pablopatito
John,
Thanks for those links. That seems to be the exact problem I'm having.
Beauregard,
I've fixed the case on my url's listed, but its still not working.
I'm thinking I will have to use two classes instead, rather than one
ID and one class, as in here:
http://jns.shared.hosting.zen.co.uk/tmp/page3.htm
This seems to get around my problem, but means editing about 50 pages.
Many thanks.