Jump to content

css not work on mozilla.why?how make browser compatible?


paramasivan

Recommended Posts

my style_sheet.csstd.normaltext{ font-size:11px; color:black; font-weight:normal; font-family:verdana,Arial;}I'm linking like this the css&html<link rel="stylesheet" href="style_sheet.css" type="text/css" media="screen">I'm using css like this<td class="normaltext" align="center"><B>Training</B></td>Works on IE but Not on MOZILLA

Link to comment
Share on other sites

it should work, but you can get rid of half of the html and stick it in the css<td class="normaltext" align="center"><B>Training</B></td>can be<td class="normaltext"><p>Training</p></td>and the css can be this:td.normaltext{font-size:11px;font-weight:bold;font-family:verdana,Arial;text-align:center;}you have 2 conflicting properties in your previous code. In the css, you say the font weight should be normal, but then you add <b></b> tags indicating the text should be bold. And the align in the td can be put into css which i've done. By default, text is black, so, unless you have another general style for the <p>, then that font will be black. Also, all text needs to be in some sort of block (i think?) tag, such as <p>, or <h2>, not <b>, which is just a style tag, if you see what i mean.Try the changes which i've made, and if they dont work, then you must have CSS turned off in your firefox browser or something else, as that code SHOULD work.:)

Link to comment
Share on other sites

it should work, but you can get rid of half of the html and stick it in the css<td class="normaltext" align="center"><B>Training</B></td>can be<td class="normaltext"><p>Training</p></td>and the css can be this:td.normaltext{font-size:11px;font-weight:bold;font-family:verdana,Arial;text-align:center;}you have 2 conflicting properties in your previous code. In the css, you say the font weight should be normal, but then you add <b></b> tags indicating the text should be bold. And the align in the td can be put into css which i've done. By default, text is black, so, unless you have another general style for the <p>, then that font will be black. Also, all text needs to be in some sort of block (i think?) tag, such as <p>, or <h2>, not <b>, which is just a style tag, if you see what i mean.Try the changes which i've made, and if they dont work, then you must have CSS turned off in your firefox browser or something else, as that code SHOULD work.:)
I'll check out the last you've mentioned with my system administrator,While i'm not agree with you on your first of attributes overriding
Link to comment
Share on other sites

look at it this way in regards to the 2 attributes clashing - how can you give the same text 2 opposite styles without using browser only hacks??the answer is, you cant.you either have the text bold, or normal, not both.:)

Link to comment
Share on other sites

look at it this way in regards to the 2 attributes clashing - how can you give the same text 2 opposite styles without using browser only hacks??the answer is, you cant.you either have the text bold, or normal, not both.:)
MY property overiding code <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><html><head><title>Paramasivan's demonstration </title><style type="text/css" media="screen">td.normaltext{ font-size:11px; color:blue; font-weight:normal; font-family:verdana,Arial;}</style></head><body leftmargin=0 topmargin=20 marginwidth=0 marginheight=0 bgcolor="#DEE7E7"><table border="0" cellspacing="0" cellpadding="0" width="100%"> <tr> <td colspan="2" class="normaltext"><b>You have to check it out.</b><font color="red"><small>*</small></font></td> </tr></table></body>Do it on IE.Will work properly.My problem is on firebox of my local serverThank you for contribution on my troubleshooting
Link to comment
Share on other sites

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><html><head><title>Paramasivan's demonstration </title><style type="text/css" media="screen">td.normaltext{font-size:11px;color:blue;font-weight:normal;font-family:verdana,Arial;}</style></head><body leftmargin=0 topmargin=20 marginwidth=0 marginheight=0 bgcolor="#DEE7E7"><table border="0" cellspacing="0" cellpadding="0" width="100%"><tr><td colspan="2" class="normaltext">this is normal text<b>This is bold text. You have to check it out.</b><font color="red"><small>*</small></font></td></tr></table></body>

Link to comment
Share on other sites

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><html><head><title>Paramasivan's demonstration </title><style type="text/css" media="screen">td.normaltext{font-size:11px;color:blue;font-weight:normal;font-family:verdana,Arial;}</style></head><body leftmargin=0 topmargin=20 marginwidth=0 marginheight=0 bgcolor="#DEE7E7"><table border="0" cellspacing="0" cellpadding="0" width="100%"><tr><td colspan="2" class="normaltext">this is normal text<b>This is bold text. You have to check it out.</b><font color="red"><small>*</small></font></td></tr></table></body>

Yes ovrerriding is possible.
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...