About the vertical centering of the background map relative to the parent container

Source: Internet
Author: User

<Divclass= "Register-wrapper">                <Divclass= "Register">                    <H1><spanclass= "Icons Icons-home"></span>XXX website homepage!</H1>                    <Divclass= "Register-links-wrapper">                        <ulclass= "Register-links">                            <Liclass= "Icons Icons-sina"></Li>                            <Liclass= "Icons Icons-qq"></Li>                            <Liclass= "Login"><ahref="#">Login</a></Li>                                <Liclass= "Regis"><ahref="#">Registered</a></Li>                        </ul>                    </Div>                </Div>            </Div>
/*top level of register head*/. Register-wrapper{width:100%;Background-color:#dcdcdc;Margin-bottom:30px;}. Register{width:1000px;Height:30px;margin:0 Auto;}. Register-wrapper{Line-height:30px;}. Register H1{Display:Inline-block;font-size:12px;Color:#898989;}. Register Span,.collection span{Display:Inline-block;}/*S Import Small icon*/. Icons{Display:Inline-block;background:URL (.. /images/icons.png) No-repeat Center Center;}. Icons-home{width:14px;Height:12px;background-position:0 0;Margin-right:5px;}. Icons-sina{width:25px;Height:22px;background-position:-30px 0;}. ICONS-QQ{width:25px;Height:22px;background-position:-60px 0;}. Icons-coll{width:10px;Height:22px;background-position:-90px 0;}/*E Import Small icon*//*top of the head link*/. Register-links-wrapper{Display:Inline-block;float: Right;}. register-links Li{Display:Inline-block;Margin-right:5px;}. Register-links Li a{Display:Inline-block;font-size:12px;Color:#34bf82;Margin-left:5px;}. Register-links Li:last-child:before{content:"|";Color:#34bf82;}

I don't know why. In this code, the background of Sina and QQ [1] is a single label wrapped up. Landing and registration [2] Also, when setting [1] height, [2] The height also changed accordingly. Where's the problem??

Import the background map, how to make it vertically centered relative to the parent container??

About the vertical centering of the background map relative to the parent container

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.