Jump to content

Left div wont stretch..


Maknib

Recommended Posts

hi guys hoping you can help..

 

i have a container with 2 divs inside of it. ithe right div inside stretches 100% but the left div will not.

 

a screenshot can be seen here: http://imageshack.us/f/88/sitegr.png/

 

I have tried all i can think of with min heights and 100% heights but i can't get that left have nav to stretch all the way... Any help please!??

 

 

i have added red and blue to show the divs..

Blue: #main-gallery

red: #gallery-images

dark-grey: #pages

 

The CSS

#main-gallery{
   background: blue;
   height: 100%;  
   padding-bottom: 50px;
   border-top: 1px solid #222222;
}

#pages{
    float: left;
   width: 120px;
   border-right: 1px solid #222222;
   text-align: left;
   padding-left: 10px;
   padding-top: 10px;
   font-family: arial;
   color: #fff;
   font-size: 14px;
   background: #2D2D2D;
}

#gallery-images{
   background: red;
   float: right;
   width: 700px;
   padding-top: 10px;
   margin-left: 10px;
}

 

HTML

		<div id="main-gallery">
            <div id='pages'>
               <ul>
            	  <?php
            	  while ($row = mysql_fetch_array($result)){ ?>
            	  <li><a href="gallery.php?view=<?php echo $row['page']; ?>">+ <?php echo $row['page']; ?></a></li>	
            	  <?php	
            	  } ?>
               </ul>
            </div>
            <div id="gallery-images">
            	<div id="image-list">
                  <?php	
                  while ($row = mysql_fetch_array($images)){ ?>
               	<a href="images/pictures/<?php echo $row['image_name']; ?>" rel="lightbox" Title="
                     Title: <?php echo $row['title']; ?> <br /> 
                     width: <?php echo $row['width']; ?><br/> 
                  	height: <?php echo $row['height']; ?>" alt="">
                  	<img src = "images/pictures/<?php echo $row['image_name']; ?>" />
                  </a>
                  <?php } ?>  
               </div>
            </div>
            <div class='clear'></div>
         </div><!-- end main -->

Link to comment
https://forums.phpfreaks.com/topic/247030-left-div-wont-stretch/
Share on other sites

on this exact same page there is a pretty big topic about pretty much  this. have a look there:

http://www.phpfreaks.com/forums/index.php?topic=343461.0

 

Freakie,

 

That page that you linked to from there, why is that a sticky footer? If I make the browser window a bit smaller, the footer disappears. See http://prntscr.com/35v1d

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.