alins Posted September 26, 2005 Report Posted September 26, 2005 piemeera kods <style> div#main{width: 75%; margin: 10px 0 0 10px; background: #cccccc;} div#main h2 {padding: 2px 5px 2px 5px; background: #888888; color:red;} </style> <div id="main">blablabla <h2>teksts1 teksts2</h2> </div> kaa vareetu dabuut lai, teksts1 ir kreisaa malaa un teksts2 labajaa malaa ieksh taa <h2>
Paulinjsh Posted September 26, 2005 Report Posted September 26, 2005 Neesmu css guru, bet vai nevar katru ielikt savā <span> katru ar savu id?
Kristabs Posted September 26, 2005 Report Posted September 26, 2005 (edited) variants ar teiblu <style> .main{width: 75%; margin: 10px 0 0 10px; background: #cccccc;} .h2 {padding: 2px 5px 2px 5px; background: #888888; color:red;} </style> <table border="0" cellpadding="0" cellspacing="0" width="50%"> <tr> <td class="main" colspan="2">blaablaa</td> </tr> <tr> <td align="left" class="h2">teksts1</td><td align="right" class="h2">teksts2</td> </tr> </table> variants ar css float, bet nezinu kaa lai nepaartrauc background koloru <style> div#main{width: 75%; margin: 10px 0 0 10px; background: #cccccc;} div#h2 {padding: 2px 5px 2px 5px; background: #888888; color:red;} </style> <div id="main">blablabla <h2 style="float:left; ">teksts1</h2><h2 style="float:right; ">teksts2</h2> </div> Edited September 26, 2005 by Kristabs
R21vo Posted September 27, 2005 Report Posted September 27, 2005 šādi derēs? <style> div#main{width: 75%; margin: 10px 0 0 10px; background: #cccccc;} .rinda { background: #888888; color:red; padding: 2px 5px 2px 5px; } </style> <div id="main">blablabla <div class="rinda"> <div style="float:left; ">teksts1</div><div style="float:right; ">teksts2</div> <div style="clear: both"></div> </div> </div>
Recommended Posts