php - creating image gallery with Twitter Bootstrap -
i trying create simple , basic image gallery using twitter bootstrap responsive design.
the images rendered dynamically. first row of images adjusting second row alignment varies.
here code
<!doctype html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>gallery</title> <link href="<?=base_url()?>assets/css/bootstrap.css" rel="stylesheet"> <link href="<?=base_url()?>assets/css/bootstrap-responsive.css" rel="stylesheet"> <style> </style> </head> <body> <div class="container-fluid"> <div class="row-fluid"> <div class = "span12"> <?php for($i=0; $i<10 ;$i++) { ?> <div class = "span3"> <a href="#" class="thumbnail"> <img src="https://www.gstatic.com/webp/gallery/4.sm.jpg" alt="sample" style = "border:solid 2px red;"/> </a> </div> <?php } ?> </div> </div> </div> </body> </html>
how can align span's exactly, looks perfect gallery structure.
i don't want use plugin here or jquery.
use row
instead of row-fluid
..
<div class="container"> <div class="row"> <div class="span3"> <a href="#" class="thumbnail"> <img src="https://www.gstatic.com/webp/gallery/4.sm.jpg" alt="sample" style="border:solid 2px red;"> </a> </div> ... </div> </div>
demo: http://bootply.com/69509
Comments
Post a Comment