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

J

Jeff

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;
}
 
J

Jonathan N. Little

Jeff said:
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.
 
M

Martin Jay

Jeff said:
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;
 
J

Jeff

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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,733
Messages
2,569,440
Members
44,832
Latest member
GlennSmall

Latest Threads

Top