If you don't understand the origin, please don't worry, drill down on the CSS rules and look at the Using css to Fix anything:20+ Common Bugs and fixes this article.
If the above article doesn't help you, you can use one of the 12 JavaScript solutions below to fix your problem and make your page look across all browsers!
In this article, we will provide you with 12 JavaScript solutions for the most common CSS problems you encounter 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. Set equal height
Since we've abandoned tabular layouts, creating visually high-quality columns or chunks of content is a challenge.
1.1 Use jquery to set high
jquery has a plug-in that can set the height of all box models within the same container, and can create very compact grids--and, of course, the extra performance overhead is negligible. From a usability and performance perspective, using a simple javascript substitution would be more appropriate: Equalheights () This function detects the height of all sibling node elements in the same container, and then sets the minimum height of each element to be the one with the highest height value in those elements.
How it works
The Equalheights () loop specifies the top-level child nodes of the element and sets the height value of the node whose minimum height value is the highest.
1.2 use jquery to set up the high column
Another set of high jquery Plug-ins
$ ("#col1, #col2"). Equalizecols ();
The above code sets #col1, #col2列等高
$ ("#col1, #col2"). Equalizecols ("P,p");
The code above sets #col1, #col2等高, and adds elements of extra space to the P element under #col1 and #col2.
Current 1/4 page
1234 Next read the full text