css float with width percentage

kodva

New Member
\[code\] #inner{ height:700px; }div.content{ float:left; width:95%;} div.content span.first { display:block; float:left; width:25%; overflow:hidden; } div.content span.second { clear:both; display:block; float:right; width:25%; } div.content span.third { clear:both; display:block; float:right; width:25%; }</style>\[/code\]\[code\]<body> <div id="outer"> <div id="inner"> <div class="content"> <span class="first"> HELLO </span> </div> <div class="content"> <span class="second"> pRERNA </span> </div> <div class="content"> <span class="third"> gOLANI </span> </div> \[/code\]When working with pixels is working but not with percentage why?I want to create three columns of equal width.If outer element is 72%.I want to create cloumns of 72/3 ie 24% width.
 
Back
Top