Style tags seem to work fine with IE but not with

Results 1 to 3 of 3

Thread: Style tags seem to work fine with IE but not with

  1. #1
    Solution Guest

    Default Style tags seem to work fine with IE but not with

    I have the following style tags in the &#060;HEAD&#062;&#060;/HEAD&#062; section.<BR>&#060;HTML&#062;<BR>&#060;HEAD&#062;<B R>&#060;STYLE type="text/css"&#062;<BR>#mystyle{<BR> visibility:show; <BR> font-style:italic;<BR> }<BR>&#060;/STYLE&#062;<BR>&#060;/HEAD&#062;<BR>&#060;BODY&#062;<BR>&#060;DIV id="mystyle"&#062;<BR>Anything here is Italic<BR>&#060;/DIV&#062;<BR><BR>&#060;/BODY&#062;<BR>&#060;/HTML<BR><BR>&#060;/BODY&#062;<BR>This works with IE 4.0 but not with NN 4.6.<BR>Can anyone say why? or what one has to do to make it work.<BR><BR>Thanks in advance.<BR>

  2. #2
    omc Guest

    Default RE: Style tags seem to work fine with IE but not w

    I think the problem is in using the ID as the selector. That practice is actually discouraged and I believe does not work in Netscape. Could you use something like:<BR><BR>&#060;STYLE type="text/css"&#062;<BR>&#060;!--<BR>h6 { visibility:show; font-style:italic; }<BR>--&#062;<BR>&#060;/STYLE&#062;<BR> <BR>Also, I thought the parameters for visibility were inherit, visible and hidden.

  3. #3
    Riva Guest

    Default RE: Style tags seem to work fine with IE but not w

    Apparently, the answer I posted died along the way - so here goes again: you can use CLASS with the DIV tag. <BR><BR>This opens up a lot of possibilities: a) the ID supposedly only works once per document; no such restriction with CLASS. b) you can define various types of CLASSes and request them as necessary in your DIVs. <BR>Assuming you were defining introductory paragraphs to be blue and italic, and concluding paragraphs to be green and upright, you&#039d define as follows:<BR>&#060;STYLE&#062;<BR> &#060;!--<BR> DIV.intro {color: blue;<BR> font-style: italic} <BR><BR> .conclude {color: green} <BR> --&#062;<BR>&#060;/STYLE&#062;<BR><BR>and tag in your document as follows:<BR><BR>&#060;DIV CLASS="intro"&#062;<BR>here is your introductory stuff in blue and italic.......<BR>&#060;/DIV&#062; <BR>some stuff in the middle is regular<BR>&#060;DIV CLASS="conclude"&#062;<BR>here is your concluding stuff in green.......<BR>&#060;/DIV&#062;<BR><BR>This should work. <BR><BR>By the way, this is useful for many tags - I&#039ve used it extensively with the &#060;P&#062; tag. The critical thing to remember is that you *must* close all tags (sometimes it&#039s obvious, but if you use CLASS with something that normally doesn&#039t need a closing tag, you will still have to use that closing tag).<BR><BR>Good luck & hope I was of some assistance. :)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •