Online computer courses, code, programming tutorial and sidebar information for monitoring Canadian S&P/TSX index. Build friendship and networking. Welcome to visit my blogs often!!! I also have two other sites: YouTube Channel and Google site.
Adsense
Popular Posts
- Formatting my post
- PHP: add a download as pdf file button in report page
- How to blend adsense inside your post?
- Notepad++ - Add C++ compiler
- PHPWind-- A PHP forum script applcaition in China
- PHP connect IBM db2 database in XAMPP
- Datatable export excel wraptext and newline
- phpexcel toggle expand and hide column in EXCEL and summary
- Renew SSL certificate from StartSSL
- Sweet Alert JS library - beautiful replacement of JavaScript Alert
Friday, August 30, 2013
clear: both in CSS
In web design, we may have 1 header, 1 left menu bar, 1 content (right of menu) and 1 footer..
<div id="header">Header</div>
<div id="menu">Left menu bar</div>
<div id="content">Some Content</div>
<div id="footer">Footer</div>
Normally we use float:left for menu and content.
#menu, #content{
float: left;
}
Even we do not use float:left for footer, it may stay the same row with content.
We need to use clear: both in footer CSS to move footer below the content and menu.
#footer{
clear: both;
}
We do not need to do this for header as the CSS after header will not impact header CSS.
clear:both syntax:
No floating elements allowed on the left or the right side of a specified paragraph:
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment