简体   繁体   中英

Bootstrap textarea align right css

I am using bootstrap with jquery and I am trying to figure out how to have this textarea line up on the right side of the screen instead of the left. Will someone please assist me in how to move it to the right side of the screen.

<div class="col-xs-7">
  <div class="row">
    <div id="overdueSection" class="col-xs-6">
        <label class="centered" for="overdueWindow">OVERDUE BATCH</label>
        <textarea type="text" name="overdueWindow" id="overdueWindow" class="form-control" rows="7"></textarea>
    </div>
  </div>
</div>

http://jsfiddle.net/pvyk3hps/

Multiple ways to achieve this

1) Custom CSS

#overdueWindow {
 float: right
}

2) Using Bootstrap push-* classes

<div id="overdueSection" class="col-xs-6 col-xs-push-6">

尝试pull-right Bootstrap类

<div id="overdueSection" class="col-xs-6 pull-right">

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