如何在CSS中对齐此文本框?

时间:2014-07-26 19:02:22

标签: jquery html css

我正在尝试将此文本框移动,但是当我尝试定位它时,它会超过我的幻灯片。我的CSS中是否需要更改某些内容以使其不会重叠并将我的垂直滚动条移开?

<section id="main_section">
        <article>
        <header>
             <hgroup>
                <center><h1>What is Iamdrivingtoday.com?</h1></center>
            </hgroup>
        </header>
            <p>Iamdrivingtoday.com is where we specialize in providing auto loans for people with bad credit. 
            We know that new and used car customers in certain times need help
            finding the right auto loan provider. If you think you 
            have a really bad, or low credit rating, or you have been
            turned down in the past, chances are we can help!  
            Our specialty is getting you financed and we guarantee an
            approval!</p>
        </article>
        <article>
        <header>
            <hgroup>
                <center><h1>Having a hard time getting approved?</h1></center>
            </hgroup>
        </header>
            <p>No matter what your prior credit which may be due to bankruptcy, divorce, 
            foreclosure, repossession, late payments, or unpaid balances we get
            you driving the same day no matter your circumstances.
            Just fill out the application and drive away today.</p>
        </article> 
    </section>

CSS:

#main_section{

    border:1px solid black;
    color: white;
    text-shadow:
     2px 2px 0 #000,  
      1px 1px 0 #000;

    background-image:url('tb.png');
    background-size: 365px 275px;
    background-color:#cccccc;
    -webkit-box-flex: 1;
    margin: 5px;
    margin-right: 625px;
    padding: 20px 20px;
}

JSFiddle

1 个答案:

答案 0 :(得分:0)

这是你要找的吗?

#main_section{

border:1px solid black;
color: white;
text-shadow: 2px 2px 0 #000, 1px 1px 0 #000;
background-image:url('tb.png');
background-size: 365px 275px;
background-color:#ccc;
-webkit-box-flex: 1;
margin: 50px 65px 0px 50px;
padding: 20px 20px;
position: absolute;
width: 400px;

}