+ Reply to Thread
Results 1 to 4 of 4

Thread: CSS Lists with images

  1. #1
    Steeevoe is offline x10 Sophmore Steeevoe is an unknown quantity at this point
    Join Date
    Feb 2009
    Location
    Leicestershire [UK]
    Posts
    103

    CSS Lists with images

    Currently I am using containers in my Gallery page: http://www.bmac.exofire.net/gallery.php , to seperate the images.

    As you can see I have two sizes of images I will be using.


    I have been experimenting and failed miserably by converting the list ways in the nav links bar at the top of the page into one that takes images and lays them out like in the current gallery.


    Is there a way I could have CSS so a list of images appears like the current gallery?

    i.e. I want to be able to use and produce the layout in the current gallery.

    <ul id=images>
    <li id=half><IMG ...></li>
    <li id=full><IMG ...></li>
    </ul>



    Thanks
    The above message was posted by a guy called Steevoe. We hope you enjoyed his comment

  2. #2
    garrettroyce's Avatar
    garrettroyce is offline Generally Helpful Member garrettroyce is a glorious beacon of lightgarrettroyce is a glorious beacon of light
    Join Date
    Apr 2008
    Location
    IL, USA
    Posts
    3,746

    Re: CSS Lists with images

    So, instead of using div's you want to use unlinked lists?

    think with a bit of css that may be possible.

    for example, to produce this:

    1
    2 3
    4

    you can do this:
    Code:
    <ul>
    <li style="display:block">1</li>
    <li style="display:inline">2</li>
    <li style="display:inline">3</li>
    <li style="display:block">4</li>
    </ul>
    I think this could be achieved in a less confusing way with tables:
    Code:
    <table>
      <tr>
        <td colspan="2">1</td>
      </tr>
      <tr>
        <td>2</td>
        <td>3</td>
      </tr>
      <tr>
        <td colspan="2">4</td>
      </tr>
    </table>
    And, as you originally posted, this is much easier using id="example" instead of attributes.
    Last edited by garrettroyce; 03-28-2009 at 11:36 AM.
    gjr.gr - coming soon: secrets of OCD coding from a self taught tinkerer

  3. #3
    Steeevoe is offline x10 Sophmore Steeevoe is an unknown quantity at this point
    Join Date
    Feb 2009
    Location
    Leicestershire [UK]
    Posts
    103

    Re: CSS Lists with images

    Yes it seems that way!

    I originaly used an old doc type in the webpages which doesn't allow the wrapper to be centered which is what I want! But when I changed the doc type of the committee page it totaly messes up the layout of the list shown here:

    http://www.bmac.exofire.net/about/committee.php

    all of the boxes dissappear and the floats just appear as a normal list when its changed to the new doc type
    The above message was posted by a guy called Steevoe. We hope you enjoyed his comment

  4. #4
    garrettroyce's Avatar
    garrettroyce is offline Generally Helpful Member garrettroyce is a glorious beacon of lightgarrettroyce is a glorious beacon of light
    Join Date
    Apr 2008
    Location
    IL, USA
    Posts
    3,746

    Re: CSS Lists with images

    Actually, the problem may be that you have a "> being echoed before the <!DOCTYPE. You can see it hanging out there in the upper left corner of your site :P
    Last edited by garrettroyce; 03-29-2009 at 09:54 AM.
    gjr.gr - coming soon: secrets of OCD coding from a self taught tinkerer

+ Reply to Thread

Similar Threads

  1. Dynamic images with PHP
    By marshian in forum Tutorials
    Replies: 24
    Last Post: 10-30-2008, 11:14 AM
  2. How to store images in a MySQL database
    By tstivers in forum Tutorials
    Replies: 10
    Last Post: 10-16-2008, 01:11 PM
  3. How to protect images without htaccess using PHP
    By frznmnky in forum Tutorials
    Replies: 0
    Last Post: 12-26-2007, 11:51 AM
  4. Corrupted Images or No Images at all!
    By kcchan in forum Free Hosting
    Replies: 8
    Last Post: 11-03-2007, 07:58 PM
  5. Images no show...
    By Starskey in forum Free Hosting
    Replies: 8
    Last Post: 10-05-2005, 11:00 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers