Click to See Complete Forum and Search --> : Help Mozilla


simlim
01-08-2004, 08:35 AM
Why Mozilla cannot read this?


<TD WIDTH="100%" STYLE="border-left-width: 1; border-right-width: 1; border-top-width: 1; padding-left: 3; padding-top:5; padding-bottom:2; padding-right:0; border-bottom-style:solid; border-bottom-width:1; border-left-style:solid; border-right-style:solid" BORDERCOLOR="#9AB7F1" height="20" bgcolor="#E6F2FF" >


Mozilla cannot read the border color and all my border color become black.

Help thanks!

pyro
01-08-2004, 08:52 AM
You've got quite a few problems there. When specifying width, you need to specify the unit you are using. IE will assume px if you do not specify, Mozilla will not. Also, you can shorten down the code a lot by using CSS shorthand, and you can use styles for the entire thing.

style="width: 100%; height: 20px; color: #000; background: #e6f2ff; border: 1px solid #9ab7f1; padding: 5px 0 2px 3px;"

Fang
01-08-2004, 09:03 AM
You can use the short form for colors ( color: #000; ) in a css,
but you should use the full form ( color: #000000; ) in an inline style declaration.

pyro
01-08-2004, 09:16 AM
Originally posted by Fang
...you should use the full form ... in an inline style declaration. Got a link?

Fang
01-08-2004, 09:37 AM
I was just trying to find it at W3C, to no avail, but blooberry (http://www.blooberry.com/indexdot/css/syntax/units/color.htm) does have a note on the short form.

pyro
01-08-2004, 09:46 AM
Since the #rgb is simply mapped to #rrggbb, I can't see there being any difference. Nor can I see using the shorthand method "wrong" when used inline.

simlim
01-08-2004, 10:48 AM
style="width: 100%; height: 20px; color: #000; background: #e6f2ff; border: 1px solid #9ab7f1; padding: 5px 0 2px 3px;"


This is good but what if I only need top left and right to have border? How to implement it?


I have too many tables created in the old style I have by Frontpage... It really tedious now for me to change it all.. Any better solution?


Thanks alot

pyro
01-08-2004, 10:59 AM
border-right: 1px solid #9ab7f1; border-left: 1px solid #9ab7f1;

As far as the tables, you could conver to a CSS based layout, which would require a bit of work now, but provides much more extensibility for the future. Apart from that, if you simply want to set borders on all the td's, you could use some css like this:

td {
/* style definitions */
}

simlim
01-08-2004, 11:05 AM
Is this a bug for Mozilla browser?

pyro
01-08-2004, 11:08 AM
Huh? :confused:

spufi
01-08-2004, 11:08 AM
I think they wanted the top, left, and right to have borders, and not just the left and right. Here's how I would do it.

border: 1px solid #9ab7f1; border-bottom: 0;

It's shorter to do it that way versus writing out the border for the three of them.

ray326
01-08-2004, 11:10 AM
Originally posted by simlim
Is this a bug for Mozilla browser? Define "this".

simlim
01-08-2004, 11:36 AM
Sorry I mean IE will assume px if you do not specify but Mozilla cannot, is this a bug?

spufi
01-08-2004, 11:46 AM
It's probably more of a bug/feature of IE than Mozilla. Mozilla in all likelyhood is going off of what the W3C standard is and since you don't specify px, it doesn't know what value you really mean, 1%, 1em, 1px.

Once you start to design with external CSS files, you won't have this, "Oh crap. I don't want to change all of those pages." feeling ever again.

ray326
01-08-2004, 12:41 PM
Originally posted by simlim
Sorry I mean IE will assume px if you do not specify but Mozilla cannot, is this a bug?
I don't believe the spec defines a default unit of measure so IE is incorrect making the assumption it is "px".