views:

67

answers:

2
<style type="text/css">
   #[':0:adId'] {        /* this does not work */
      background:red;
   }
</style>

<div id=":0:adId">Loading...</div>

Google Maps use this id format. How do i set the style?

+3  A: 

You simply need to escape the : with a \:

<style type="text/css">
    #\:0\:adId {
        background:red;
    }
 </style>
Daniel Vassallo
cool man ~~~cool man ~~~
zjm1126
A: 

You could do this with a attribute selector, like so:

div[id=":0:adId"] {
    background: red;
}

This will not work in all browsers(you guessed IE), so you might have to include some javascript to do the trick there:

$('div[id=":0:adId"]').css({
    background: '#FFF'
});

(Uses jQuery)

tdolsen