Alignment using float property in css
Wednesday, March 19th, 2008In this tutorial you will learn the use of float property in css. We will create two unordered lists and align them side by side. Write the following code in your html page. You can use any text editor or software like dreamweaver for that.
<div id=”test”>
<div class=”lefty”>
<ul>
<li>Item1</li>
<li>Item2</li>
<li>Item3</li>
<li>Item4</li>
</ul>
</div>
<div class=”righty”>
<ul>
<li>Item1</li>
<li>Item2</li>
<li>Item3</li>
<li>Item4</li>
</ul>
</div>
</div>
Now make these entries to your css file:
Div or table which is better?
Wednesday, March 19th, 2008I personally think that div provides more flexibility than the tables. Using tables you can position the contents horizontally or vertically but using div you are free to put contents anywhere in your page. Also it is very easy to make changes to div without affecting the original layout of the page; you just need […]