Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CSS on Mac OS X 1

Status
Not open for further replies.

JSNewb

Technical User
Feb 7, 2006
6
US
So on windows my CSS looks great, using IE6. But on Safari 2.0.3, Firefox 1.5.1, and IE Mac 5, it doesn't work at all.

I am using standard css1 stuff, that should be support by all. Whats going on?

Here is all of the CSS im using.

Code:
  <style type="text/css">
  td.spacer { width: 5px };
  td.grp-head { font-size: 14px; background-color: #3399FF; font-weight: bold };
  td.head { text-align: center; font-style: italic; font-size: 12px };
  td.head-n { text-align: center; font-style: italic; font-size: 12px; width: 150 };
  td.grp { text-align: center; font-size: 12px };
  td.grp-n { text-align: right; font-size: 12px; width: 150 };
  td.grp-1 { text-align: center; background-color: #FFFFCC; font-size: 12px };
  td.grp-1n { text-align: right; background-color: #FFFFCC; font-size: 12px; width: 150 };
  td.grp-2 { text-align: center; background-color: #FFFFCC; font-size: 12px };
  td.grp-2n { text-align: right; background-color: #FFFFCC; font-size: 12px; width: 150 };
  </style>
 
You are not specifying any units for a lot of your properties. Things like:

Code:
width: 150

should be

Code:
width: 150[!]px[/!]

Also, when you say "doesn't work at all", that's not giving us any idea of how it doesn't work. How does it "not work"?

Hope this helps,
Dan

[tt]Dan's Page [blue]@[/blue] Code Couch
[/tt]
 
When i say doesn't work at all, I mean just that.

Not one of those lines of CSS is recognized by the 3 browsers listed.
There is no color, no centering, no italics, no bold, no width control, nothing. It is just the tables, as is.

I did fix the width 150, to add "px" to them for good form however.

I tried making a test file, and the test file worked, so now im really confused.

Test Page - Works
Real Page - Broken
 
How are you including the file? Are your class names in your CSS file the same case as those in the HTML (some browsers are case-sensitive when it comes to classes)? Can you show your HTML, with the CSS link, or a URL to it?

Dan



[tt]Dan's Page [blue]@[/blue] Code Couch
[/tt]
 
wow, that is goofy. :)

Took them out and it works.

Thanks for finding that, the fact that IE6 ignores it made me think it was ok to do.
 
Hehe.. IE6 is a tipster's nightmare. It allows so much through that shouldn't be... and basically enforces the belief that it's ok to do poor coding because most new developers only test in IE.

Good to see it worked, and also good to see you testing on browsers and platforms other than IE/Win.

Dan

[tt]Dan's Page [blue]@[/blue] Code Couch
[/tt]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top