简体   繁体   中英

How to pull image to the left on twitter bootstrap modal?

I am using Twitter Bootstrap 2.3 and am having some trouble pulling an image to the left. I need to create a comment box for my pictures (done) and lazy load the image (done). The problem is that I want the picture to be left-aligned related to the comment box. Instead, it's on the top. I am using Twitter's bootstrap modal for that.

Here's a demo of the code:

http://pastebin.com/hjh3pqyN (SO didn't format it correctly)

Here's the result:

在此输入图像描述

I'd like to have the green selection on the left and the red one on the right, like this:

|-------------|
| WINDOW      |
| |-----|---| |
| |Green|Red| |
| |-----|---| |
|-------------|

Is it possible?

Thanks!

I would rather use built-in features than applying custom CSS to the elements:

<div class="row-fluid">
  <div class="span6">
   <!-- left goes here -->
  </div>
  <div class="span6">
   <!-- right goes here -->
  </div>
</div>

Inside eg left container, you can apply pull-left or pull-right class to the <img> to make it algined.

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