Another Netscape CSS question
This should sound familiar: "My site looks right in Internet Explorer but not in Netscape." Well I'll do everyone a favor and narrow my question to one single line of code.
<?php
style=\"color: #ffffff; font-size: 14px; font-weight: bold; text-align: center\">
?>
This is just one example but there are a lot more. Basically, it seems to me that in Netscape, Mozilla, etc. - CSS will follow a linked style sheet completely (class=this_name). This includes font, color, decorations and more. But when I use inline CSS (style="these_attributes") it gets all screwed up in Netscape. In the example above, it gets the color right but fails at font size. In another example not shown it will also get the font right but still not the size.
My first question is what's up with the differences between MSIE and NS and how do I overcome it? But I also have the second question of why is one area's font correct in NS and another area's font not correct?
Bonus question: Is there a problem with combining linked and inline CSS?
<?php
<p class=9 style=\"color: #ffffff; text-align: center; padding-left: 5px; padding-right: 5px\">
?>
dk01 posted this at 16:44 — 3rd January 2003.
He has: 516 posts
Joined: Mar 2002
Wow I am not sure exactly what to touch on first but here goes...
There are some differences in how IE, NS, and Opera handle CSS. This alone is a problem. Add in the problem of different versions of each browser and you get a huge mess.
There are a few rules I would follow. One being not to use inline styles unless you really have to. The other being to keep this as separate as possible as to not confuse browsers. I do not know what version of each browser you are using or I could maybe tell you a more specific answer.
If you post this page or even just a page showing how it does not work then we can help fix the problems.
-dk
fifeclub posted this at 17:28 — 3rd January 2003.
He has: 688 posts
Joined: Feb 2001
The site I'm working on is mikesussman.com
It looks good (to me) in IE 5+. You'll notice in most modern browsers that the text of my name on top, the text in the menu, and the links at the bottom are all okay in any browser (correct size and san-serif font). It's not the end of the world in NS but here's what to look for:
1)The 'browser check' text just below the menu (and that number too),
the copyright in the bottom left corner,
todays date in the top right,
and all page titles (in the oval graphic):
All are the right color (white) but all wrong font and except for the title, they should all be 9px size.
2) The Guestbook section is different. All the fonts are somehow correct in NS/Mozilla (san-serif) but the sizes aren't. The 'browser check' seems small but the copyright and date are huge. The guestbook uses a second style sheet so I realize there's some competing codes.
I don't expect to get everything perfect in all browsers, especially when using 3rd party scripts like Gallery and Guestbook, but I'd really like to clear up the "regular" problems that are described in #1.
Thanks
Mike
P.S. In my Gallery section, this is the only section where the margins seem to not work when in Netscape (there should be no margins) and I don't know why to that either.
Suzanne posted this at 21:58 — 3rd January 2003.
She has: 5,507 posts
Joined: Feb 2000
1. CSS relies on a valid HTML tree, and valid markup. Enclose all attribute values in quotation marks and validate that code.
2. You can use multiple classes: class="thisone thatone"
3. NO NUMERICAL VALUES FOR CLASS OR ID NAMES! It MUST start with a letter.
But you'd know all that if you had validated your code...
Suzanne posted this at 21:59 — 3rd January 2003.
She has: 5,507 posts
Joined: Feb 2000
Also, please specify if you're having problems with N4.x or N6+.
fifeclub posted this at 22:15 — 3rd January 2003.
He has: 688 posts
Joined: Feb 2001
Wow! :eek: Never new about the must start with a letter rule. And I didn't know that I can combine multiple classes like that either. (So I can write class="bold size14 white" combining decoration, font size and color?) Wow. That's so much more flexable then what I've been doing! I always make things more complicated than it needs to be
P.S. Those differences I was referring to is regarding NS6 and Mozilla. I know people still use NS4 but I honostly just don't worry about version 4 browsers too much. I'd worry about WebTV more
Suzanne posted this at 22:22 — 3rd January 2003.
She has: 5,507 posts
Joined: Feb 2000
Assuming that you have a .bold, .size14 and .white, then yes.
Renegade posted this at 02:03 — 4th January 2003.
He has: 3,022 posts
Joined: Oct 2002
you had
I personally would not have my font size in pixels but anyways you the fact that you have spaces count? Try:
<?php
style=\"color:#ffffff;font-size:14pt;font-weight:bold;t ext-align:center\">
?>
fifeclub posted this at 02:59 — 4th January 2003.
He has: 688 posts
Joined: Feb 2001
I usually just follow directions when installing a script but while installing pplogger all it says is "don't forget to rename your /admin directory and secure it with htaccess". Well I know ho to rename a file in WS_FTP and I also know how to create and upload an .htaccess file (by typing -la in that spot under MkDir on the right so it won't be hidden anymore) BUT how do I "secure it with htaccess"? What does that mean for me to do? Sorry if that's an easy one but I don't know how. Thanks.
Busy posted this at 07:52 — 4th January 2003.
He has: 6,151 posts
Joined: May 2001
secure as in chmod I guess - in ws_ftp right click on the file/folder name and chmod is down the bottom section. do they give you a number or letters? 755 or rw-r-rwe ? you will need to know what to chmode it to before you do it or you could find ourself locked out of it.
or maybe just password protect it with .htaccess? but this could be done through your control panel (if you have one)
Renegade posted this at 08:14 — 4th January 2003.
He has: 3,022 posts
Joined: Oct 2002
How do you use .htaccess?
Suzanne posted this at 18:24 — 4th January 2003.
She has: 5,507 posts
Joined: Feb 2000
okay guys, .htaccess is a server-side problem. hop over there and make a new thread or search for .htaccess for more information.
Busy posted this at 20:27 — 4th January 2003.
He has: 6,151 posts
Joined: May 2001
Renegade spaces don't matter, same as html, can be width = "12" the browser ignores blank spaces
Renegade posted this at 06:36 — 5th January 2003.
He has: 3,022 posts
Joined: Oct 2002
o really? I thought spaces did matter, hmm m you learn something new everyday
Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.