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
- PHPWind-- A PHP forum script applcaition in China
- How to blend adsense inside your post?
- Formatting my post
- Notepad++ - Add C++ compiler
- Install PHPMailer 5.2.4 and use smtp gmail
- Set up a child account and set screen time limit in Windows 8
- Wayback Machine - see archived versions of web pages across time
- phpexcel toggle expand and hide column in EXCEL and summary
- Install PHP ibm_db2 extension in Linux (redHat)
- PHP: add a download as pdf file button in report page
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