Solved

How to center alternate text for an image vertically and horizontally

Posted on 2008-06-26
4
231 Views
Last Modified: 2010-04-09
how do I get the alternate text for this image to center vertically and horizontally? Do I have to place valign="middle" and Div align="center"  and/or class="altMsg" somewhere else in the code?

Thanks!

John




<td valign="middle" width="180" height="140"><div align="center"><a href="http://www.cowboom.com" class="altMsg"><img src="images/BidNowSilver.jpg" alt="Picture not available. Speak to your network administrator about privileges." width="150" height="129" border="0"></a></div></td>
 
 
.altMsg {font-family: "Gill Sans MT"; font-size: 12px; line-height:14px; color:#000000; text-align:center;}

Open in new window

0
Comment
Question by:gabrielPennyback
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 82

Accepted Solution

by:
hielo earned 250 total points
ID: 21879349
you cannot control the position of the "tooltip" produced by alt. That decision is made by the browser.
0
 
LVL 44

Assisted Solution

by:scrathcyboy
scrathcyboy earned 250 total points
ID: 21880740
hielo is correct.  This location is set in the .EXE code for the browser, so many pixels to the right and either below or above the leading line that the link is coming from.  If you MUST try to position the "tooltips" message that the browser produces onMouseOver, then you will actually have to center the text through either absolute position or table layout so that the TRUE center of the screen is about 10 pixels to the right of the RIGHT side of the link you are hovering over.  About 10 px will put the start of tooltips dead center on the screen.  And this will vary depending on each browser and version, but you can FUDGE it near enough.
0
 
LVL 1

Author Comment

by:gabrielPennyback
ID: 21886776
Since my image is already in a table cell, along with other images in other cells, I gues s I can't use scratchyboy's technique. Or can !?

 Either way thanks to both of you.

John
0
 
LVL 44

Expert Comment

by:scrathcyboy
ID: 21888875
Only if you have the line where you want centered tooltips on its own line, not in a series of columns.
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Use these top 10 tips to master the art of email signature design. Create an email signature design that will easily wow recipients, promote your brand and highlight your professionalism.
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
In this tutorial viewers will learn how to embed custom externally-hosted Google Fonts using the Google Font API in CSS Go to the Google Fonts website at google.com/fonts: Browse or search based on font properties or name to find a suitable font for…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

623 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question