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!

Class name problem

Status
Not open for further replies.

audiopro

Programmer
Apr 1, 2004
3,165
GB
I assigned a class with the name of 'centcol' and none of the settings were applied. I renamed the class as 'midcolum' and everything worked as expected. Have I used a reserved word or am I losing my mind?

Keith
 
Do you have a HTML element with id or name = centcol.

I ran across something similar a few months ago, I had a radio button group with the name = "workStatus" as well as a CSS class named workStatus. The CSS class wasn't being applied until I changed the name.

[monkey][snake] <.
 
Only the div' class is named as centcol.
I'll put it down to experience, it caused me some problems but it is working now. I create enough errors with CSS, I don't need ones which happen for no reason.

Keith
 
Probably an IE only bug, centcol is a Microsoft top secret nuclear testing word.

[monkey][snake] <.
 
Are you certain there wasn't any upper/lowercase shenanigans going on?

For example, centcol != centCol

Would you not be better using an ID instead of a class?
If you only ever have 1 centcol then an ID would seem more appropriate. Of course if you have more than 1 centcol, a class would be the way to go. :)

<honk>*:O)</honk>

Tyres: Mine's a pint of the black stuff.
Mike: You can't drink a pint of Bovril.
 
I checked case etc. over and over again.
As a test, once it was working I renamed back to 'centcol' (thinking I was losing the plot) and it all went wrong again.

I will be re-using the same div further down the page but for now there is only one. I have been working backwards trying to get to the bottom of the problem.

Keith
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top