Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to set body center

2025-03-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly introduces "how to set body center". In daily operation, I believe many people have doubts about how to set body center. The editor consulted all kinds of materials and sorted out simple and easy-to-use operation methods. I hope it will be helpful to answer the doubts of "how to set body center"! Next, please follow the editor to study!

FF and IE

1. Div Center title div setting equipment margin-left, when margin-right is auto, IE is not allowed, IE important setting body is centered. First of all, in the parent element boundary, the meaning of text-algin: center; means that the mode in the parent element is centered.

two。 The frame of the link (a label) and the backstop a link plus the frame and background object, you need to set up the equipment display: block, and configure float: left to ensure that the line will not be changed. With reference to menubar, setting the height of an and menubar is to prevent the bottom edge from being misplaced. If you do not set height, probably insert a space in the menubar.

3. The problem that the hover pattern does not arise after the hyperlink visit is that hover and active no longer exist in the hyperlink pattern visited. Many people should have encountered this problem. The solution is to reverse the layout measures of the CSS attribute:

L-V-H-A Code:

4. Cursor finger cursor cursor: pointer can also represent cursor finger shape in IE FF, hand only IE may

5.UL 's padding and margin ul tags have a padding value by default in FF, while only margin has a default value in IE, so first define ul {margin:0;padding:0;} or a small part of the topic.

6. FORM tag this tag in IE, will take the initiative to margin some margins, while in FF margin is 0, so if you want to flash differences, so it is most fortunate to specify margin and padding in css, for the above two problems, my css is as usual as the capital application of fancy ul,form {margin:0;padding:0;} to the boundary is dead, so it will not be a headache for this later.

7. BOX model explains that different BOX model expressions of different title problems in FF and IE lead to different 2px manipulation modes:

Div {marginal Vista 30px importantposition marginal Vista 28px;

Be careful that the flashbacks of these two margin must not be reversed. The attribute important is not recognized by IE, but may be recognized by other browsers. Therefore, the actual confession of love under IE is as follows:

Div {maring:30px;margin:28px}

Frequent definitions are carried out according to the last one, so it is not possible to write only margin:xx pxboxes.

# box {width:600px; / / for ie6.0- w\ idth:500px; / / for ff+ie6.0} # box {widthidth:500px; 600pxcards / / for ff width:600px; / / for ff+ie6.0 width / * * /: 500px; / / for ie6.0-} at this point, the study on "how to set body center" is over. I hope you can solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report