Does anyone know an easy way to display two divs on the same line? The two divs are in a parent div that sets its position. This is the code:
CSS:Code:<div id="legend"> <div id="greenbox"></div> <div class="legendtext">= originals</div> <br> <br> <div id="bluebox"></div> <div class="legendtext">= arrangements</div> </div>
This is how I want it to look, where [greenbox]/[bluebox] is just a 8 pixel colored box by CSS:Code:#legend { position:absolute; float:right; top:200px; right:75px; width:200px; } .legendtext { display:inline; } #greenbox { width:8px; height:8px; background-color:#006633; } #bluebox { width:8px; height:8px; background-color:#06F; }
[greenbox] = originals
[bluebox] = arrangements
But this is how it appears:
[greenbox]
= originals
[bluebox]
= arrangements
I've tried "display:inline;" and "float", neither works.



Reply With Quote



Bookmarks