Guest delilahrocksme Posted January 11, 2006 Share Posted January 11, 2006 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 More sharing options...
mreddy Posted January 11, 2006 Share Posted January 11, 2006 Hello,My guess is that the :'s are reserved for pseudo-classes and you can't use them for anything else. But that is just my guess Link to comment Share on other sites More sharing options...
boen_robot Posted January 11, 2006 Share Posted January 11, 2006 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 More sharing options...
playmenow Posted January 18, 2006 Share Posted January 18, 2006 <head><style>.green {color: green}</style></head><body><h1 class="green">Some text</h1><p class="green">Some text</p></body> should work......but no more :. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now