If you do not understand the reason, do not worry. go deep into the CSS rules and take a look at using CSS to fix anything: 20 + Common Bugs and fixes.Article.
If the previous article does not help you, you can use one of the following 12 JavaScript solutions to fix your problem and make your page look across all browsers!
In this article, we will provide 12 JavaScript solutions for the most common CSS problems encountered in Web application development.
You may be interested in other CSS-related articles.
- Using CSS to do anything: 50 + creative examples and tutorials
- Using CSS to fix anything: 20 + Common Bugs and fixes
1. High Setting
Since we abandoned the table-based layout, Creating visually high columns or content blocks has become a challenge.
1.1 Use jquery to set height levels
Jquery has a plug-in that can set the height of all the box models in the same container to be equal, and a very concise grid can be created-of course, the extra performance overhead is also minimal. from the perspective of availability and performance, it is more suitable to use a simple JavaScript alternative: The javasheights () function checks the height of all the sibling node elements in the same container, then, set the minimum height of each element to the one with the highest height.
How to operate
The equalheights () loop specifies the top-level subnodes of the element, and sets their minimum height value to the height value of the highest node.
1.2 use jquery to set high-level Columns
Another high-profile jquery plug-in
$ ("# Col1, # col2"). equalizecols ();
AboveCodeSet # col1, # col2 column height
$ ("# Col1, # col2"). equalizecols ("P, P ");
The above Code sets the # col1, # col2, and adds the elements with extra space to the P elements under # col1 and # col2.