Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > newbie: This CSS works in IE but not in FireFox, Opera, Netscape

Reply
Thread Tools

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

 
 
Jeff
Guest
Posts: n/a
 
      06-23-2006
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;
}


 
Reply With Quote
 
 
 
 
Jonathan N. Little
Guest
Posts: n/a
 
      06-23-2006
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
 
Reply With Quote
 
 
 
 
Martin Jay
Guest
Posts: n/a
 
      06-23-2006
In message <(E-Mail Removed)>, Jeff
<(E-Mail Removed)> 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
 
Reply With Quote
 
Jeff
Guest
Posts: n/a
 
      06-23-2006
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" <(E-Mail Removed)> wrote in message
news:731ce$449beb24$40cba7ba$(E-Mail Removed)...
> 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



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
hyperlinks works with IE but not with Netscape Eric ASP .Net 2 11-23-2008 04:35 PM
Code works in Netscape 7.1 but not IE ---- document.getElementById('other').style.visibility='hidden'; lawrence Javascript 3 09-30-2004 06:22 AM
pic and text to iframe, works in IE but not Netscape Treetop Javascript 4 01-19-2004 04:41 PM
Streaming Realaudio link works in Netscape but not IE Shan HTML 3 01-15-2004 06:42 PM
Code works in IE but not Netscape/Mozilla Keegan Alex Javascript 1 07-30-2003 01:10 PM



Advertisments