Results 1 to 6 of 6

Thread: Gallery images falls below menu

  1. #1
    Join Date
    Jan 2010
    Posts
    52

    Gallery images falls below menu

    I'd like to have a vertical menu on the left and a gallery of images to the right. To do that I must put a "float: left" on my menu (I think). The problem is that images in the gallery (supposed to be right) falls below the menu when it ends. Excuse me I can not put my page online, but I can give the code (simplified):

    PHP Code:
    <div id="menu">
        
    under-menu1 <br />
        
    under-menu2 <br />
        
    under-menu3 <br />
    </
    div>
     
    <
    div id="gallery_image">
        <
    img src="image1" />
        <
    img src="image2" />
        <
    img src="image3" />
        ...
    </
    div
    HTML Code:
    #left
    {
    	position: relative;
    	width: 190px;
    	height: auto;
    	float: left;
    }
     
    #gallery_images
    {
    	width: auto;
    }
    And although I like the images that do not go under the menu, but still good in their column (even if the menu stops, it requires that the Gallery can continue to descend, but it does not go under the menu )

  2. #2
    Join Date
    May 2008
    Posts
    2,389

    Re: Gallery images falls below menu

    To resolve your problem, put your div #gallery_images to float: left too. Other than that I don't find any problem with your code. I would suggest you to provide some more information to get a better solution.

  3. #3
    Join Date
    Jan 2010
    Posts
    52

    Re: Gallery images falls below menu

    But when I put the gallery in "float: left" it appears directly below the menu (and not right menu).

    ok I'm starting to get the gallery of images "encroach" on the menu column.

    Now the problem is that if you add images, the div of the gallery "grows", but (and this is the problem) the container div does not grow.

    And the "background-color" is applied to the container div (so that the background is applied uniformly to div "menu" and the div "gallery")

    So as the container div do "grows up" no, there is a space below the menu (and ugly)

    You see the problem?
    PHP Code:
    <div id="container">
        <
    div id="menu">
            
    under-menu1 <br />
            
    under-menu2 <br />
            
    under-menu3 <br />
        </
    div>
     
        <
    div id="gallery_image">
            <
    img src="image1" />
            <
    img src="image2" />
            <
    img src="image3" />
            ...
        </
    div>
    </
    div
    HTML Code:
    #container
    {
        background-color: black;
        width: auto;
        height: 100%;
        min-height: 900px;
    }
     
    #left
    {
        position: relative;
        background-color: rgb(13,122,242);
        width: 15%;
        min-width: 80px;
        max-width: 190px;
        height: auto;
        min-height: 500px;
        float: left;
        margin-right: 5px;
        overflow: hidden;
        border: 1px solid white;
    }
     
    .gallery_images
    {
        background-color: black;
        width: 83%;
        float: left;
    }

  4. #4
    Join Date
    May 2008
    Posts
    2,297

    Re: Gallery images falls below menu

    Did you tried to remove the '<div id="gallery_image">' to place a single photo that you change the src to javascript which gives you the css attributes of gallery_image. Try to enlvent and keeping the width: 100% and see what is best.

  5. #5
    Join Date
    Nov 2008
    Posts
    1,185

    Re: Gallery images falls below menu

    I understood nothing. What are you trying to do? Getting back to the first question, it is best to have the menu DIV

    Code:
    float : left
    as you have done, instead to have the container DIV in normal position with a left margin (margin-left) equal to the size of your menu.

    And 'float: left' work well too.

    regarding the management of container floating, its a common problem

  6. #6
    Join Date
    Jan 2010
    Posts
    52

    Re: Gallery images falls below menu

    Maybe I did not understand what you mean but I do not think I need to change the way I built the gallery images (the content is built well). And the width of the site poses no problem.

    The problem you see is that I have my div "menu" and my div "gallery" which are all contained in a thick 2 div "container". When there are not too many images it goes well (for the div "container" and even bigger than the div "gallery") but when I add images, the div "gallery" grew up to become bigger than the div "container", and that time it will require the div "container" grow at the same time as the div "gallery" (while there ... the div "gallery" grew up alone, leaving the div "container" far behind)

    The trick is that the background is applied to the div "container" (required to have a uniform background over the entire site area) and as the div "container" does not grow to the background either, it looks very ugly.

Similar Threads

  1. Bright Falls in Alan Wake
    By itech in forum Video Games
    Replies: 4
    Last Post: 10-02-2012, 04:15 AM
  2. Error while saving images in Photo Gallery
    By erinvg in forum Windows Vista Performance
    Replies: 5
    Last Post: 03-03-2011, 11:47 PM
  3. Cannot copy images with Windows Live Photo Gallery
    By Anthony12 in forum Windows Software
    Replies: 6
    Last Post: 26-08-2010, 04:30 PM
  4. Windows not showing some gif images in Photo Gallery
    By Huntsman in forum Windows Software
    Replies: 4
    Last Post: 12-01-2010, 06:08 PM
  5. Asus Eee Pc 901 Falls To $500
    By Praetor in forum Portable Devices
    Replies: 1
    Last Post: 09-09-2008, 07:35 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,750,351,913.60464 seconds with 16 queries