Go Back   CodingForums.com > :: Client side development > HTML & CSS

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 10-21-2009, 12:25 AM   PM User | #1
Gabby7
New Coder

 
Join Date: Jul 2009
Location: USA
Posts: 24
Thanks: 13
Thanked 0 Times in 0 Posts
Gabby7 is an unknown quantity at this point
attempting to center text (title) under thumbnail

Hello+
Thank you in advance for your guidance...

I am using CSS to display thumbnails in a 'grid' w/out using tables (thanks to all who advised on that!), my issue is the title is off center of the thumbnail. I will put the code below:

CSS:

Code:
li.title {
	display: block;
	list-style: none;
	text-align: center;
	color:#FFFFFF;
	font-family: Arial, Helvetica, sans-serif;
	font: 14px;
}
XHTML:

Code:
<div class="pic ls"><a href="projects1.html" class="tn"><img src="images/thumbnails/Alaska/alaska00001.png" alt="Two Glaciers Picture" width="116" height="91" border="0"></a></div>
  <ul>
<li class="title">Two Glaciers</li>
</ul>
I am under the impression that the text-align: center; is supposed to make the title center under the thumbnail, but it does not appear to be that way when I preview in IE8 & FF3.5.3

Thank you for any guidance available!
Gabby7 is offline   Reply With Quote
Old 10-21-2009, 05:14 AM   PM User | #2
Excavator
Master Coder


 
Excavator's Avatar
 
Join Date: Dec 2006
Location: Alaska
Posts: 9,410
Thanks: 22
Thanked 1,765 Times in 1,749 Posts
Excavator has a spectacular aura aboutExcavator has a spectacular aura aboutExcavator has a spectacular aura about
Hello Gabby7,
It seems to me that a caption is not a list so you're not using the ul for what it's intended.
Have a look at a photo presentation method of mine that may work for you - http://nopeople.com/CSS/thumbnail%20...ion/index.html
__________________
Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad
Excavator is offline   Reply With Quote
Users who have thanked Excavator for this post:
Gabby7 (10-22-2009)
Old 10-22-2009, 01:07 AM   PM User | #3
Gabby7
New Coder

 
Join Date: Jul 2009
Location: USA
Posts: 24
Thanks: 13
Thanked 0 Times in 0 Posts
Gabby7 is an unknown quantity at this point
Excavator, that is exactly what I am attempting to do! Thank you so much for the help!
Gabby7 is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 03:28 AM.


Advertisement
Log in to turn off these ads.