newbie: This CSS works in IE but not in FireFox, Opera, Netscape

Discussion in 'HTML' started by Jeff, Jun 23, 2006.

  1. Jeff

    Jeff Guest

    Hey

    This code works in IE, but not in FireFox, Opera, Netscape. I mean that in
    IE this CSS generates a border arround this UL, but in
    firefox/opera/netscape this border isn't shown, so I wonder what I must
    change to make this border visible in FireFox, Opera, netscape too.

    I uses PHP to I check what browser the user is using, so if the user are
    using IE I send IE dedicated CSS script and if the user are using FireFox I
    send Firefox dedicated CSS script... does it for Opera and Netscape also

    BTW, this .php passed validation at www.w3c.org (This Page Is Valid XHTML
    1.0 Transitional!)

    Please, if you see what's wrong with my CSS script, then tell me what I must
    do to solve my problem

    Jeff

    <div class="my_menu"> <ul> <li><a href='index.php?cat=2&amp;mod=5'>TEST
    A</a></li> <li><a href='index.php?cat=2&amp;mod=6'>TEST b</a></li> <li><a
    href='index.php?cat=2&amp;mod=7'>TEST C</a></li> <li><a
    href='index.php?cat=2&amp;mod=8'>TEST D</a></li> </ul></div> .my_menu {
    padding-top:10px;
    padding-bottom:10px;
    width:100%;
    float:left;
    margin:0;
    }

    ..my_menu ul {
    padding-top:10px;
    padding-bottom:10px;
    margin-bottom:0px;
    margin-top:0px;
    margin-left:10px;
    margin-right:10px;
    border-style:dotted;
    border-bottom:1px;
    border-left:1px;
    border-top:1px;
    border-right:1px;
    }


    ..my_menu ul li {
    list-style:none;
    text-align:left;
    padding-left:20px;
    }
     
    Jeff, Jun 23, 2006
    #1
    1. Advertising

  2. Jeff wrote:
    > Hey
    >
    > This code works in IE, but not in FireFox, Opera, Netscape. I mean that in
    > IE this CSS generates a border arround this UL, but in
    > firefox/opera/netscape this border isn't shown, so I wonder what I must
    > change to make this border visible in FireFox, Opera, netscape too.
    >
    > I uses PHP to I check what browser the user is using, so if the user are
    > using IE I send IE dedicated CSS script and if the user are using FireFox I
    > send Firefox dedicated CSS script... does it for Opera and Netscape also
    >
    > BTW, this .php passed validation at www.w3c.org (This Page Is Valid XHTML
    > 1.0 Transitional!)
    >
    > Please, if you see what's wrong with my CSS script, then tell me what I must
    > do to solve my problem
    >
    > Jeff
    >

    <code snipped>

    Better for a url then code.

    Simple question, what is the border color? But not sure why, but cause
    all side are styled the same the shorthand

    border: 1px dotted;

    works.

    --
    Take care,

    Jonathan
    -------------------
    LITTLE WORKS STUDIO
    http://www.LittleWorksStudio.com
     
    Jonathan N. Little, Jun 23, 2006
    #2
    1. Advertising

  3. Jeff

    Martin Jay Guest

    In message <>, Jeff
    <> writes
    >Hey
    >
    >This code works in IE, but not in FireFox, Opera, Netscape. I mean that in
    >IE this CSS generates a border arround this UL, but in
    >firefox/opera/netscape this border isn't shown, so I wonder what I must
    >change to make this border visible in FireFox, Opera, netscape too.
    >
    >I uses PHP to I check what browser the user is using, so if the user are
    >using IE I send IE dedicated CSS script and if the user are using FireFox I
    >send Firefox dedicated CSS script... does it for Opera and Netscape also


    Different style sheets for different browsers isn't a good idea, and can
    make a lot of extra work.

    >.my_menu ul {
    >padding-top:10px;
    >padding-bottom:10px;
    >margin-bottom:0px;
    >margin-top:0px;
    >margin-left:10px;
    >margin-right:10px;
    >border-style:dotted;
    >border-bottom:1px;
    >border-left:1px;
    >border-top:1px;
    >border-right:1px;
    >}


    This is something I haven't come across before, but I'd guess the
    problem occurs because of the way you're written the border style rules.

    >border-style:dotted;


    Gives all four sides a dotted line.

    >border-bottom:1px;
    >border-left:1px;
    >border-top:1px;
    >border-right:1px;


    Gives all four sides a line of 1px, but with no style so they're not
    shown.

    To set the border size and retain the dotted style you should use:

    border-style:dotted;
    border-bottom-width: 1px;
    border-left-width: 1px;
    border-top-width: 1px;
    border-right-width: 1px;

    Or just use the following in this case:

    border: dotted 1px;

    Probably a good idea to use a colour too, so:

    border: dotted 1px red;
    --
    Martin Jay
    Phone/SMS: +44 7740 191877
    Fax: +44 870 915 2124
     
    Martin Jay, Jun 23, 2006
    #3
  4. Jeff

    Jeff Guest

    CASE SOLVED

    Thank you, the "border: 1px dotted #0033CC;" was the solution...

    Anyway the problem is solved and I'm very thankful for you taking the time
    to answer my question.

    Have a nice weekend!

    Jeff



    "Jonathan N. Little" <> wrote in message
    news:731ce$449beb24$40cba7ba$...
    > Jeff wrote:
    >> Hey
    >>
    >> This code works in IE, but not in FireFox, Opera, Netscape. I mean that
    >> in IE this CSS generates a border arround this UL, but in
    >> firefox/opera/netscape this border isn't shown, so I wonder what I must
    >> change to make this border visible in FireFox, Opera, netscape too.
    >>
    >> I uses PHP to I check what browser the user is using, so if the user are
    >> using IE I send IE dedicated CSS script and if the user are using FireFox
    >> I send Firefox dedicated CSS script... does it for Opera and Netscape
    >> also
    >>
    >> BTW, this .php passed validation at www.w3c.org (This Page Is Valid XHTML
    >> 1.0 Transitional!)
    >>
    >> Please, if you see what's wrong with my CSS script, then tell me what I
    >> must do to solve my problem
    >>
    >> Jeff
    >>

    > <code snipped>
    >
    > Better for a url then code.
    >
    > Simple question, what is the border color? But not sure why, but cause all
    > side are styled the same the shorthand
    >
    > border: 1px dotted;
    >
    > works.
    >
    > --
    > Take care,
    >
    > Jonathan
    > -------------------
    > LITTLE WORKS STUDIO
    > http://www.LittleWorksStudio.com
     
    Jeff, Jun 23, 2006
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. John Dalberg
    Replies:
    29
    Views:
    4,154
    kchayka
    Nov 3, 2004
  2. Bob
    Replies:
    24
    Views:
    1,580
  3. patrickkellogg
    Replies:
    3
    Views:
    176
  4. Bob
    Replies:
    3
    Views:
    112
    Randy Webb
    Jul 14, 2006
  5. Bob
    Replies:
    3
    Views:
    121
Loading...

Share This Page