Adsense
Popular Posts
- MySQL workbench -"Could not decrypt password cache"
- Install APXS in Redhat Linux
- react-pdf, display pdf in react.js
- Transfer modules between sites
- JavaScript, remove trailing insignificant zeros after toFixed function
- Set Windows path command line
- datatable order by nunmeric
- MySQL date created and date modified
- React: connect(mapStateToProps, mapDispatchToProps)
- 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