Jul 24, 2008

Css Based Photo Gallery Code - Fluid design for layout

Free Web Hosting, No Ads > CONTRIBUTE > Tutorials

free web hosting

Css Based Photo Gallery Code - Fluid design for layout

jlhaslip
Fluid Design Photo Gallery

There are quite a few Topics here on the Trap17 Forum about how to set-up and use Photo Galleries and about the link code for getting from a Thumbnail Image to a full size Image and all that stuff, so I would like to take this "Photo Gallery" concept one step further without covering what others have already supplied instruction for. Usually, when there is a solution posted here for the code on "how-to-do-this", there are tables involved and the Links are placed inside Table cells.

Tables are not neccesarilly a bad thing, but they were not originally intended to be used as structural elements in html or on the web. So here is an example of a Gallery which does not use Tables: Gallery link

The trick is in the CSS code used for the layout of the list of links. For those of you who understand CSS, there will be little need for an explanation. For those of you just learning, here is an explanation.

The CSS and comments:
HTML
#imagelist {
list-style-type: none; // removes the list images from the li's
}
#imagelist li {
float: left; // floats the li to the left with margins as follows
margin-right: 6px;
margin-bottom: 10px;
padding-bottom:6 px;
font: bold 0.8em Arial, Helvetica, sans-serif; // set font information as a single line
color: #333333; //forecolour is set here
}
#imagelist img {
display: block; // display as block so the description is below the Image
border: 1px solid #333300; // sets border size, shape and colour
}


When you view the file, notice how the image layout changes to accomodate the window width? and no Horizontal scroll bar?
Size the thumbnails according to the size and shape of the full sized pictures, unless you like distortion.

So maybe now we will see fewer Table-based Photo Gallery designs?

Tested in FF, Opera8, IE5 and IE5 iMac

I hope this is helpful.

 

 

 


Reply

Tyssen
It looks nice and neat at the moment cos your images are all the same size, but you may want to give your <li>s a height & width when you start adding images of different shapes.

Reply

Dragonfly
That is cool because it will fit to all kinds of screen resolution and monitor resolution visitors are using. The pictures will just slip down when more pictures cannot be viewed in the same row, otherwise if one uses table it will give horizontal bar which I really dont' like. The only problem with the CSS based photogallery of yours is the size of the pictures, one may want to alter the size of the pictures according to the sources..

Reply

Avalon
QUOTE(Tyssen @ Jan 18 2006, 05:46 PM)
It looks nice and neat at the moment cos your images are all the same size, but you may want to give your <li>s a height & width when you start adding images of different shapes.
*


Yes, once you start using different size thumbnails it will start to look messy. I think you will need to set the li element size to something bigger than your largest thumbnail. If you do this, will it run the risk of showing the dreaded horizontal scroll bar if viewed at different screen resolutions? I guess you could resize the thumbnails to a set width and let the height of the thumbnail be determined by the size ratio of the image, this will still look a little messy I think.

Reply



Got an Opinion! Express your Views! (no registration):-
Add your Reply/ Opinion/ Views/ Comments/ Suggestion/ Questions/ Queries etc.
Posts with decent grammar & English will be accepted and please refrain from profanities.
For asking a Question, We recommend you to sign-up (for free) so that you can track the topic easily.

Nature of your Post*: Opinion/ Reply/ Comments
Question/Query
Feedback to us.
       
Name   Email
Title/Question*

(Maximum characters: 10,000)
You have characters left.
Confirm Code:

Recent Queries:-
  1. css photo gallery - 4.27 hr back. (1)
  2. css code picture gallery - 4.34 hr back. (2)
  3. photo with code - 5.27 hr back. (1)
  4. css fluid thumbnails - 5.27 hr back. (1)
  5. photo gallery css based - 12.55 hr back. (1)
  6. how to make a photo fit to screen with css coding - 17.44 hr back. (1)
  7. css for picture gallery - 17.56 hr back. (2)
  8. css photo gallery layout - 22.70 hr back. (1)
  9. css code for gallery - 30.35 hr back. (1)
  10. html photo gallery code - 31.85 hr back. (1)
  11. photo gallery code - 11.84 hr back. (3)
  12. gallery css code - 37.85 hr back. (1)
  13. css gallery code - 7.99 hr back. (3)
  14. website html code photo layouts - 46.72 hr back. (1)
Similar Topics

Keywords : css, based, photo, gallery, code, fluid, design, layout

  1. Add Flashing Inbox To Invisionfree Forum
    Html code for invsiionfree!! (0)
  2. Make A Flat Based Shoutbox, With Auto Refresh.
    (6)
    With this tutorial, you will learn how to create a simple shoutbox, but only uses a .txt file. Also
    with auto refresh, and I am going to do a backgound. We will be making 5 files. 1. index.php The
    main page 2. msg.php Reading msg.txt 3. msg.txt Note: You must give it 777 4. shout.php Where
    it add to msg.txt 5. bg.gif Background. Index.php would be like this: Shoutbox
    Name: Message: Let's go over what the code do. -> are just the title.
    gets msg.php which gets msg.txt. You will know why I do that later. -> is wh....
  3. [php] Clean Code Functions
    Clean up your html output from php scripts (5)
    There is another Topic about writing 'clean' HTML code posted elsewhere on the Forum.
    I'll edit this Topic and add the link so you can review it on your own, and there is no need for
    me to comment on it in this thread, but the purpose of this Topic is to introduce a pair of
    functions which can be used for making sure that the HTML output from my scripts is readable when a
    view-source is reviewed. Two handy functions are included here. They work together quite nicely,
    and I will start this Tutorial with a short summary of the reasons for their 'being....
  4. Nice Clean Php Layout Coding.
    Learn a nice neat way to code your layouts with php (7)
    There are basically two main ways to code your php. Method 1) Creating a php document with an html
    look. The you throw in include tags all over the place. Its unorganized, and you have lots of stray
    files hidden in folders and scattered in your base directory. Its difficult to organize, and you
    make mistakes easily. Example: This document would be called index.php Whatever
    Banner or something Some content here. Mostly along the lines of You might ask what
    the problem was? Well, those include tags tend to multiply, and so do all those unne....
  5. Background Image Swap Script
    Change a Background Image based on clock time (15)
    Background Image Changer Script To swap the background image from your CSS file according to the
    Server Clock Time. 1.) In your CSS file, add the following rule: CODE body {
        background: url(time.png); } 2.) Create a "folder" named time.png. 3.) Into the
    folder, place three images named morning.png, day.png, night.png. 4.) Also, in the same folder,
    create an index.php file and copy/paste the following script. CODE <?php $hour =
    date('H'); if ($hour < 12 ) {     $image =
    "morning.png"; } ....
  6. Faux Ajax Loading - Css Only
    Pretend your site is Ajax based (3)
    Link: http://www.jlhaslip.trap17.com/samples/misc/ajax/index.html Check that out. The first page
    has information and the second and has the actual example of its use with sample CSS code. I find
    that when you visit a site which has a slow server and attempt to view 'large' Image files,
    it is pretty boring to sit and stare at a blank screen, so this little snippet of code can be used
    to give the visitor something to see to indicate that the image is being downloaded. I built a
    small animated gif that sits in the background of the space allocated for the image....
  7. Making a java based program
    (3)
    Java GUI Making a Little Java Program Sec. 1: Imports and starting it off Sec. 2: Variables Sec.
    3: Frame and Stuff Sec. 4: Declaring buttons Sec. 5: Adding buttons Sec. 6: Action Listening Sec. 7:
    Using this for a learning experience Section 1 Now, let's think. What imports do we need? We
    obviously need GUI imports. We also need the action Listener. So, let's declare this at the very
    top: Code: CODE import java.awt.*; import java.awt.event.*; import javax.swing.*; That's
    all we need to get all our supplies. Now to start us off. Skip a couple lines ....
  8. Do You Want To Use Php Code In Your Html Pages?
    Within two minutes you will! (9)
    Whilst searching around for help to setup cutenews blog I came across a way to use php in html pages
    - lo and behold it works! so I thought I'd share it with you all (Unfortunately I can't
    remember the site so I wrote this up a couple of minutes after I did it:) ). This method requires a
    web server with apache installed. So, luckily for us all this covers the whole of Trap17... even
    Qupis /tongue.gif" style="vertical-align:middle" emoid=":P" border="0" alt="tongue.gif" /> Just
    to make the point, this is in no way a difficult task and it doesn't requir....
  9. Css-based "i-frames" (sort Of)
    A couple of ways to do it... (1)
    I got thinking that it might be nice to have a method to load a bunch of pictures up to a site, but
    not have them taking up a lot of space. And without using a bunch of php, while still presenting the
    entire picture. And using full-on CSS coding, not tables or frames. So here you go... a "picture in
    a picture" method. A CSS framed picture And a "hidden" "picture in a picture" method. A
    "hidden" CSS framed picture Sort of a way to 'hide the picture and let the user decide if they
    want to actually see the image. All it does is use positioning for placing the....
  10. How To Make A Simple File Based Shoutbox Using Php And Html
    (8)
    A simple tut to make a simple shoutbox. Let me jump right in. First of all you need the standard
    equipment for PHP, an IDE like XAMPP and an editor like PHP EDITOR 2OO7. Were going to make a
    simple guestbook using three files, webpage.php, shout.php and shout.txt. Webpage.php can be
    changed to whatver you want, it will be the page on which the guestbok is shown, you could even use
    this code and add it to another php page n your site. Shout.php is the proccessing page and
    shout.txt is where the shouts are stored. Firstly we need to make the visual design of the box.....
  11. Image Gallery Tutorial Using Hoverbox
    A php solution to coding the Hoverbox Image Gallery (14)
    As reported in another posting , there is an Image Gallery named Hoverbox from the Sonspring site
    which is a pretty cool display method using CSS to have Thumbnail pictures double their size by
    hovering over them. I liked the css included in the original Tutorial as found on the Sonspring
    site , but I knew there was more than one use for the Hoverbox and took it upon myself to explore
    the use of the Hoverbox on a site I webmaster. One thing that wasn't right was having to
    hardcode the image tags, so the first version I wrote used php to fill the Hoverbox by rea....
  12. Your First Autoit
    Learning To Code.. (2)
    Autoit is a simple, yet powerful programming language, it allowed the creation of the pangea
    desktops, and the Remote Pc Control with a cell.. You can learn it too. Here is the first of several
    lessons i will post inside of this topic. It is a 32 bit program, it doesnt work on windows 98, 95,
    and i dont think (THINK) Windows ME Step 1: Download and install the latest version of autoit from
    http://www.autoitscript.com i prefer that you use beta. Step 2: Right click somewhere on your
    desktop or my documents, and mouseover new and click Autoit V3 Script Step 3 (optiona....
  13. Beginner's Guide To Skiing
    Based on my own experience. (4)
    I really like skiing. It is so much fun that you won't know how you could have survived until
    your first time. So here are some things you should know before you head over to your lcoal ski
    area: Dressing: You should get a few basic things: -Base layer: long underwear, especially
    thermals, keep you warm, wick moisture from the skin, keep your legs from getting irritated by your
    ski pants -Middle layer: A fleece jacket; or anything aside from wool, which is very itchy. This
    will keep you warm in cold weather. If your outer jacket or parka (see below) is insulate....
  14. Uploading Images To The Trap17 Gallery
    A How To, on uploading images to the trap17 gallery (4)
    Well, seeing as how BuffaloHelp or OpaQue has told us to upload our images to the trap17 gallery
    instead of our own, i figure that i could help out those who dont know how to do it because it
    isn't all that easy for the noobs. Uploading Images To The Trap17 Gallery Step 1:..
    Obviously You need a picture so get one of those Step 2:.. Go to "My Controlls" Step 3:.. Once
    you get there, on the left hand side look for "Invision Gallery" Step 4:.. Click On "Your Albums"
    Step 5:.. Now you need to create an album so click on "Create My First Album" S....
  15. Php Spy Code
    Spy on your site! (21)
    Code Spy Code Description Anyone who comes to ur forum's IP Adress, Site they came From,
    Their Browser and the time they came will get saved in a place that only the admin knows the
    location of... V.2 More features coming up in V.2!!! POst suggestions/problems...
    Preview:- http://s15.invisionfree.com/Spy/index.php ? REFRESH THE PAGE, AND GO HERE:-
    http://h1.ripway.com/programming/spy%20code/spy.html ^^^^^^^That shows all the IP's, Browsers,
    Time, site and stuff....^^^^^^^^ Code First of all, you'll need to host the files.... I sugg....
  16. Php Navigation
    How to make your navigation based on php (7)
    I have re-constructed my last PHP Navigation system and it works great. So I have it here for you
    guys. Here are the instructions. INSTRUCTIONS: Open your main page for your site in your text
    editor and paste in the following code where the main content goes. CODE <?php
    error_reporting (E_ALL ^ E_NOTICE); if(!$page){ $page =
    $HTTP_GET_VARS['page']; } //You can change 'page' to whatever you want.
    //Default Page if($page == "" or $page == "index"){
    include("main....
  17. Handy Javascript Code Snips
    Ready to Apply in your webpage (5)
    /tongue.gif' border='0' style='vertical-align:middle' alt='tongue.gif' /> Some common things to
    implement in our webpage very frequently are as follows. How to implement all these I am going to
    tell you in this tutorial. Add To Favorite Set As Homepage Go To Top Of Page No Right Click
    Print Page Adding Current Date Adding Current Time Pop-Up Page Creation Closing Window
    Copyright Notice Updation 01. Add To Favorite Someone may be interested in the content of your
    page. Offer him/her to add the page in his/her favorite menu. To do this you have ....
  18. Css And Javascript Combined For Dynamic Layout
    use of different CSS files at same site (9)
    This tutorial is meant for people that are dealing with problems while coding their site at 100% of
    width. Important notice: Some people has JavaScript disabled, so they will not be able to load CSS
    file (take this in account when creating your website). How this script works. In the HEAD of your
    HTML document will apply this command, so variable.js file will be load at start: CODE
    <script type="text/javascript" src="variable.js"></script> In
    browser JavaScript file variable.js is loaded. This Javascript file consist of this para....
  19. Jalbum 5.2
    Gallery Building Software (0)
    Just thought I would create a tutorial for those who want to use a gallery on their site but
    don't know how. This tutorial looks at JAlbum 4.4.2, which you can get by going here GET JAlbum
    5.2 // Step 1 JAlbum allows you to create a photo album without even leaving its main page. Here
    you can select the image directory, output directory, common album settings and control the album
    generation. // Step 2 To select an image directory, just drag and drop an image folder onto the
    Image Directory bar. JAlbum can read photos in JPG, GIF and PNG formats as well as movie ....
  20. 'make' A Virus To Test Your Norton Antivirus
    Not a harmful code (0)
    This code is to simply check if your Norton Antivirus is working probably. Not sure if it will work
    on other AVs. The following code is provided by EICAR. QUOTE
    X5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!SH+H* Copy the
    content from the code into Notepad and save it as 'eicar.com' If your Norton AV is working
    probably a pop up of a Virus Alert should pop up and removed the virus immidiately. ....
  21. How To Put A Phpbb Login Box On Your Main Site.
    Code and .php included!!! (18)
    I have included my coded file with this... Ok here is the code. CODE // //Create login area,
    replace the phpBB2 in /phpBB2/login.php with your forum's //directory // <form
    action="/phpBB2/login.php" method="post" target="_top"> <table
    width="25%" cellspacing="2" cellpadding="2" border="0"
    align="center">  <tr> <td align="left"
    class="nav"><a href="/phpBB2/index.php" class="nav">Prank Place
    Forum Index</a></td>....
  22. How To Setup A Php-nuke Based Site
    very helpfull (5)
    Ok, so you want to have a php nuke site. First of all, what is this "PHP nuke", and why is it so
    special? Php nuke is a web portal system. It is expandible, and can be very usefull. You can find
    an example here. Yes, it is that good. So, lets take a closer look. It's pre-packaged basic
    features are: *forums *a login system *weblinks *downloads *news *polls *faqs *content You can
    allways de-actuvate some features, but it's near-imposible to remove them. Kinda annoying, but
    you know. Some people may not need phpnuke, or cant have i period. You need: *some ....

    1. Looking for css, based, photo, gallery, code, fluid, design, layout

Searching Video's for css, based, photo, gallery, code, fluid, design, layout
advertisement



Css Based Photo Gallery Code - Fluid design for layout



 

 

 

 

ADD REPLY / Got an Opinion! Remove these ADs! RAPID SEARCH! Free Web Hosting [X]
Express your Opinions, Thoughts or Contribute more info. to help others.
Ask your Doubts & Queries to get answers, So that "Together We can help others!"
Register FREE for AD-FREE forum, Create your own topics, Ask Questions, track topics, setup subscriptions & notifications and Get a Free Website w/ Email and FTP.
500MB Space *No Ads*, CPanel, FTP, PHP, MySQL, EMails - 100% FREE