lfrohman
asked on
css reference an id with a colon
I want to create a css rule specific to an id, but the id has a colon embeded. I can't do anything about
the colon. In the example below, aaa works as expected, but ccc:ddd is not affected by the css, the
table appears normally, not width 100%. I want the ccc:ddd to work like the aaa. How can I do this?
<html>
<head>
<style>
table#aaa {width:100%}
table#ccc:ddd {width:100%}
</style>
</head>
<body>
<table id="aaa" style="background-color:gr een;color: white"><tr ><td>aaa</ td></tr></ table>
<br/>
<table id="bbb" style="background-color:gr een;color: white"><tr ><td>bbb</ td></tr></ table>
<br/>
<table id="ccc:ddd" style="background-color:gr een;color: white"><tr ><td>ccc:d dd</td></t r></table>
</body>
</html>
the colon. In the example below, aaa works as expected, but ccc:ddd is not affected by the css, the
table appears normally, not width 100%. I want the ccc:ddd to work like the aaa. How can I do this?
<html>
<head>
<style>
table#aaa {width:100%}
table#ccc:ddd {width:100%}
</style>
</head>
<body>
<table id="aaa" style="background-color:gr
<br/>
<table id="bbb" style="background-color:gr
<br/>
<table id="ccc:ddd" style="background-color:gr
</body>
</html>
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
why can't you do anything about the colon?