Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New Coder
    Join Date
    Jul 2009
    Location
    USA
    Posts
    24
    Thanks
    13
    Thanked 0 Times in 0 Posts

    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!

  • #2
    Master Coder Excavator's Avatar
    Join Date
    Dec 2006
    Location
    Alaska
    Posts
    9,673
    Thanks
    22
    Thanked 1,827 Times in 1,811 Posts
    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

  • Users who have thanked Excavator for this post:

    Gabby7 (10-22-2009)

  • #3
    New Coder
    Join Date
    Jul 2009
    Location
    USA
    Posts
    24
    Thanks
    13
    Thanked 0 Times in 0 Posts
    Excavator, that is exactly what I am attempting to do! Thank you so much for the help!


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •