CSS: Problem applying a style to an element - using multiple selectors -


can tell me doing wrong. have following html

<div id="dialog-container">     <div id="dialog-box" title="" >         <div id="dialog-icon" >             &nbsp;         </div>         <p>         <span id="dialog-message"></span>         </p>     </div> </div> 

i have css floats left. if enter following works

#dialog-box #dialog-icon {     float: left;      height: 32px;      width: 32px;    } 

but if enter 1 more rule i.e insert #dialog-container before #dialog-box not applied liek this

#dialog-container #dialog-box #dialog-icon {     float: left;      height: 32px;      width: 32px;    } 

but thought means apply dialog-icon thats inside dialog-box , inside dialog-container?

am missing something?

thanks

edit

the question has been edited didn't paste html correctly, now...

you html not correctly formed or structured needs. missing closing div tag on second div. maybe need:

<div id="dialog-container">     <div id="dialog-box" title="" >         <div id="dialog-icon" >             &nbsp;         </div>     </div> </div> 

the way had it, third div not treated child (or 'inside') second.

edit following update

i've tested in jsfiddle (adding colour red , text highlight). seems working ok:

http://jsfiddle.net/ww3v2/

do have more info?


Comments

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -