Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsGeneralPHPASPPerlColdFusionFlashHTML, CSS, ScriptsBrowsers

Webmaster Forum / HTML, CSS, Scripts / CSS / November 2006



Tip: Looking for answers? Try searching our database.

image gallery in <ul>: vertical alignment

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Nik - 30 Nov 2006 10:12 GMT
I have a simplified version of my image gallery at:

http://www.niksally.f2s.com/upload/gallery/mixed_gallery.html

Essentially, the format of the html is an in-line list:

<ul>
 <li><img></li>
 <li><img></li>
</ul>

At present, portrait and landscape images are bottom-aligned, which
looks a little funny.  Is it possible to have them centre-aligned?  I
could relatively easily add a class to the <li> to denote portrait or
landscape arrangement.

The long dimension or each image is 120px, but not all aspect ratios are
exactly 4:3.

TIA.

Nik
Bergamot - 30 Nov 2006 12:44 GMT
> http://www.niksally.f2s.com/upload/gallery/mixed_gallery.html
>
> At present, portrait and landscape images are bottom-aligned, which
> looks a little funny.  Is it possible to have them centre-aligned?

img {vertical-align:middle}

You might want to add some margins to that, too.

Signature

Berg

Nik - 30 Nov 2006 13:53 GMT
>>http://www.niksally.f2s.com/upload/gallery/mixed_gallery.html
>>
[quoted text clipped - 4 lines]
>
> You might want to add some margins to that, too.

Many thanks.

I'm sure I tried that, but I must have been styling the <li> instead of
the image.

Nik
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.