Jump to content

id's with ":" in them...


Guest delilahrocksme

Recommended Posts

Guest delilahrocksme

i have a little problem...i have page on which i cannot change the id's but am allowed to use css to change the styles...here is a code example

<head><style>#green:yes {color: green}</style></head><body><h1 id="green:yes">Some text</h1><p id="green:yes">Some text</p></body>

now this isnt the acttuall code but its much shorter and is basiclly the same...the problem is that the :'s...i think...is there a way to make this work??thanks,doss

Link to comment
Share on other sites

IDs are a thing that you may use only one in a page per elememt. There can't be two elements called "green:yes" in a single XHTML. I also echo mreddy that ":" are probably reserved for pseudo classes though I'm not sure.However, I think you might be able to to the following:

h1#green:yes {color: green}p#green:yes {color: green}

If possible, tell the person who made the XHTML document to make theese IDs a single class AND remove the ":" from the ID and class names just in case.

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...