


A compilation of methods to fix browser headaches with JavaScript [Translation] Page 1/4_javascript skills
If you don’t understand why, don’t worry, dig into the rules of CSS and take a look at Using CSS to Fix Anything: 20 Common Bugs and Fixes this article.
If The article above won't help you at all, you can use one of the 12 javascript solutions below to fix your problem and make your page look good across all browsers!
In this article , we will provide 12 javascript solutions to 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 heights
Since we abandoned tables Based on the layout method, it becomes a challenge to create columns or content blocks with visually equal heights.
1.1 Use jquery to set equal heights
jQuery has a plug-in that can set the height of all box models in the same container to be equal, and can also create a very simple grid - of course, the additional performance overhead is minimal. From the perspective of usability and From a performance perspective, it would be more suitable to use a simple JavaScript instead: 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 the one with the largest height value among these elements. .
How it works
equalHeights() loops through the top-level child nodes of the specified element and sets their minimum height value to the height value of the highest node.
View Demo
1.2 Set Contour Columns Using jQuery
Another jQuery plugin to set equal heights
$("#col1, #col2").equalizeCols();
The above code sets the height of #col1, #col2 columns to be equal
$("#col1, #col2").equalizeCols("p,p");
The above code will set the equal heights of #col1 and #col2, and add elements that add extra space to the p elements under #col1 and #col2.

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics











The steps to register an Ouyi account are as follows: 1. Prepare a valid email or mobile phone number and stabilize the network. 2. Visit Ouyi’s official website. 3. Enter the registration page. 4. Select email or mobile phone number to register and fill in the information. 5. Obtain and fill in the verification code. 6. Agree to the user agreement. 7. Complete registration and log in, carry out KYC and set up security measures.

The Ouyi Exchange app supports downloading of Apple mobile phones, visit the official website, click the "Apple Mobile" option, obtain and install it in the App Store, register or log in to conduct cryptocurrency trading.

To safely download the Binance APP, you need to go through the official channels: 1. Visit the Binance official website, 2. Find and click the APP download portal, 3. Choose to scan the QR code, app store, or directly download the APK file to download to ensure that the link and developer information are authentic, and enable two-factor verification to protect the security of the account.

Sesame Open Door is a platform that focuses on cryptocurrency trading. Users can obtain portals through official websites or social media to ensure that the authenticity of SSL certificates and website content is verified during access.

Choose a reliable trading platform such as OKEx to ensure access to the official entrance.

Registering a Sesame Door Account requires 7 steps: 1. Prepare a valid email or mobile phone number and a stable network; 2. Visit the official website; 3. Enter the registration page; 4. Select and fill in the registration method; 5. Obtain and fill in the verification code; 6. Agree to the user agreement; 7. Complete registration and log in, it is recommended to carry out KYC and set security measures.

Visit Binance official website and check HTTPS and green lock logos to avoid phishing websites, and official applications can also be accessed safely.

EU MiCA compliance certification, covering 50 fiat currency channels, cold storage ratio 95%, and zero security incident records. The US SEC licensed platform has convenient direct purchase of fiat currency, a ratio of 98% cold storage, institutional-level liquidity, supports large-scale OTC and custom orders, and multi-level clearing protection.
