Google Browser CSS Center compatibility problem Perfect solution

Source: Internet
Author: User

In IE kernel browser or Firefox browser can be centered, there is no center can use its special tags to set the center but in Google browser to see when the bug can not be centered, the following solution has a similar situation friends can refer to the following

Div to do the interface, there are CSS hack (CSS-compatible browser issues) in IE Kernel browser or Firefox browser can be centered, there is no center can use its special tags to set the center, the following underlined _ IE6 priority recognition,!important Only Firefox firefox browser recognition. But in Google browser view, there will be compatible with the Google browser bug, can not be centered.

Now adding two sentences to your stylesheet will solve the problem.

Style sheets are modified in this way

Copy Code code as follows:


. Google-center
{width:320px;
height:202px;
Text-align:center;
* Plus these two sentences, in Google browser to achieve the landing interface in the center of the * *
Margin-left:auto;
Margin-right:auto;
Color: #ff33ff;
Background-color: #ccffcc;
}

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.