Jump to content

[SOLVED] Does Firefox not support classes.


liam1412

Recommended Posts

I have foolishly developed my site in IE6 and when I have tested it on firefox it is not picking up any of the class definitions from the CSS in the header.  I have only used CSS for the fonts and the site looks fine but the font colors and style are not been picked up.

I am inserting using

<p class="normtext">Some Text</p>

Another thing I have noticed is, I have put the whole site  in a 600 pixel column down the middle. I am using tables for layout (tut tut) and everything is in a 600 pixel wide table seperated up into the necassary sections. the table is aligned to the middle. But on some of the pages it jumps slightly to the left in firefox. Why would that be????????


I am a noobie and cannot think of a reason for either of these at all.

Thanks
Liam O'Neill
Link to comment
Share on other sites

I'm afraid you'll have to give us some code samples to be able to help you out of this one. Firefox does support classes, and Firefox is actually [b]much[/b] more standards compliant than IE6. You are much better off typically to develop in FF and [i]then[/i] try to make it work with IE6 (and IE7, for that matter).
Link to comment
Share on other sites

Okay - My CSS is in the head section rather than a seperate document. And all the class definitions follow the same format so have just included a couple

<style type=text/css>

p.norm text
{
font-family:verdana, "trebuchet ms";
font-size:"12px"
color:"#b5b5b5"
}

.border
{
border-width:"2px"
color:"#565656"
}



</style>
<body bgcolor="#444444">

<table align="center" width="600">
<tr>
<td class="border" align="left" valign="bottom" width="600"><p class="normtext">Some text</p></td>
</tr>
</table>

In IE this is a 600px table with a dark grey border that is 2px wide. The text is light grey in the font verdana.

In firefox it is in the font verdana but the text is gray and the specified size is disreagrded.  The border is also displayed as a standard border.
Link to comment
Share on other sites

You need to get a little more familiar with your CSS properties: your color and border-color and background-color specifically. Here is some changes I've made to get the CSS to do all the work instead of trying to combine markup attributes with CSS. That will nearly always cause you problems. Here is what I propose you examine, and yes, I have tested this in both IE6 and FF and it works well in both:

[b]HTML[/b]
[code]
<body>
<table>
<tr>
<td>
<p class="normText">Some Text</p>
</td>
</tr>
</table>
</body>
[/code]

[b]CSS[/b]
[code]
body {
background-color: #444444;
text-align: center;
}

table {
margin: 0 auto;
width: 600px;
text-align: left;
}

td {
border: 2px solid #565656;
vertical-align: bottom;
width: 600px;
}

.normText {
font-family: verdana, "Trebuchet MS", arial, helvetica, sans-serif;
font-size: 12px;
color: #b5b5b5;
}
[/code]

Hope this helps you some!
Link to comment
Share on other sites

That helps more than you could imagine. I have to admit I have only vaguely looked at CSS at the . Before I just used html to mark up everything BUt was hounded into looking at it. I was so eager to got on with the PHP side of things and learn that (much more interesting i feel) i just kind of skimmed through me. I didn't realise you could break it down into everything. Obviouls with different classes of everything there needs to be no styling in the mark up at all.

Cheers obsidian
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.