Adsense
Popular Posts
- MySQL workbench -"Could not decrypt password cache"
- peer review (3)
- PHP, dump varailbes in a format way
- "Unusual traffic from your computer network" from blogger
- Install APXS in Redhat Linux
- JavaScript, remove trailing insignificant zeros after toFixed function
- Update member directory
- Set Windows path command line
- JavaScript: add days to current date
- DataTable table order by numeric, not by text
Friday, October 11, 2013
CSS float and clear property
Sometimes, we use CSS float property to push an element left or right so the next element can be wrapped around,. CSS code:
float:right;
What happen, if next element does not want to be wrapped, we can use CSS property clear to not allow floating elements on the left or the right side, CSS code:
clear:both;
Example 1: in WikiWP blogger template, the message body is too far from content, this is due to
clear:both; are use, remove clear:both; in CSS to fix the problem
Example 2: footer is in same row as content, we need to add clear:both; before footer CSS to put the
footer down as a new line.
Labels:
css
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment