简体   繁体   中英

Problems Centering DIV

I can't seem to get my login div to center, I'm thinking its conflicts with the Twitter Bootstrap I'm using, hoping someone can give me a hand figuring out what is causing this..

I'm trying to get it working on Desktop, IPhone and IPad.. it is close, was centered in iphone, but desktop and ipad its pretty off centered

http://jsfiddle.net/urkd4/1/

your div will be centered if you remove styling from span9.

i just changed the class name of the span so the style does not apply...

 <div class="container-fluid">
    <div class="row-fluid">

        <!--/span-->
        <div class="span">
            <div class="loginContainer">
<form class="form-horizontal" action="dashboard.html" id="loginForm">
    <div class="form-row row-fluid">
        <div class="span12">
            <div class="row-fluid">
                <label class="form-label span12" for="username">
                    Username:

at it works as the span9 class has some werd width on it :)

http://jsfiddle.net/urkd4/2/embedded/result/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM