Page 1 of 4 123 ... LastLast
Results 1 to 10 of 40

Thread: php with css..

  1. #1
    Join Date
    May 2006
    Posts
    46
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default php with css..

    hey guys im doing a picture gallery for my cuz and im using a databse to keep the name of the pics with description.

    so i use

    PHP Code:
    <?php echo '<a href="/members/Gymgraph/'.$row['type1'].'/'.$row['pic1'] .'" target="_blank" with="144">
    <img src="/members/Gymgraph/'
    .$row['type1'].'/'.$row['pic1'].'" border="0" alt="" width=115/>
    </a>
    <br />'
    ?>
    so this shows the pics in the databse.now i need to put some look in to it..lol

    cause it shows all the pics on one line..

    pic pic pic pic pic pic
    i would like to make it show like

    pic pic pic pic

    pic pic pic pic..
    Last edited by Snookerman; 04-22-2009 at 08:46 AM. Reason: added “Resolved” prefix

  2. #2
    Join Date
    May 2007
    Location
    Boston,ma
    Posts
    2,127
    Thanks
    173
    Thanked 207 Times in 205 Posts

    Default

    are all the images the same size like 100 pixels by 100 pixels? or do you have a link?

  3. #3
    Join Date
    May 2006
    Posts
    46
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    it is like tumbnails then when you click you see full size

  4. #4
    Join Date
    May 2007
    Location
    Boston,ma
    Posts
    2,127
    Thanks
    173
    Thanked 207 Times in 205 Posts

    Default

    Ok try this

    Code:
    <div id="limitor">
    <?php echo '<a href="/members/Gymgraph/'.$row['type1'].'/'.$row['pic1'] .'" target="_blank" with="144">
    <img src="/members/Gymgraph/'.$row['type1'].'/'.$row['pic1'].'" border="0" alt="" width=115/>
    </a>
    <br />'; ?> 
    
    </div>
    This goes in CSS doc
    Code:
    #limitor {
    width: 200px; (total pixels of 4 images assuming each is 50 pixels with no border or padding)
    }

  5. #5
    Join Date
    May 2006
    Posts
    46
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    this is for the size?i need it for the placement..lol thx!



    pic pic pic pic

    pic pic pic pic

  6. #6
    Join Date
    May 2007
    Location
    Boston,ma
    Posts
    2,127
    Thanks
    173
    Thanked 207 Times in 205 Posts

    Default

    That will limit the images add up to more then the pixels said it will drop it the left over amount down one line image1(50px) image2(100px) image3I(150px) image4(200px) image5(newline 50px) image6(100px) image7(150px) image8(200px).

  7. #7
    Join Date
    May 2006
    Posts
    46
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    it doesnt work it still shows the images one under the other?

    http://softcoredesign.com/maint.php

  8. #8
    Join Date
    Oct 2008
    Location
    Sweden
    Posts
    2,023
    Thanks
    17
    Thanked 319 Times in 318 Posts
    Blog Entries
    3

    Default

    Try floating them left.
    Eddy Proca
    I love Dropbox. Get it through my girlfriend's referral link (I reached my limit) and both you and her get 500 MB extra! Thanks and you're welcome!

  9. #9
    Join Date
    May 2006
    Posts
    46
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    i added float: left;

    still the same

  10. #10
    Join Date
    Oct 2008
    Location
    Sweden
    Posts
    2,023
    Thanks
    17
    Thanked 319 Times in 318 Posts
    Blog Entries
    3

    Default

    You floated the container:
    Code:
    #limitor {
    float:left;
    width:200px;
    }
    You should float the images themselves:
    Code:
    #limitor {
    width:200px;
    }
    #limitor img {
    float:left;
    }
    Eddy Proca
    I love Dropbox. Get it through my girlfriend's referral link (I reached my limit) and both you and her get 500 MB extra! Thanks and you're welcome!

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
  •