Help - Search - Members - Calendar
Full Version: Table trouble: Link text goes under img, instead of beside it
HTMLHelp Forums > Web Authoring > Markup (HTML, XHTML, XML)
LadyBugAbode
Hi all,

I'm new here. I'm building a simple, user-friendly site for a friend and am feeling quite frustrated.

I can't get the link text in the navbar to display right. On my screen (PC), it's fine. On hers (Mac), the text for "Themed Perfomances" and "Caldendar of Events" is forced under the hourglass image. I've tried including the hourglass img inside the link tags (which I prefer to do as it makes the "clickable" area larger), but when I did, it put the underline for the link right through the hourglass. I've tried putting the img outside the link, and I've tried using "& n b s p ;" to force the image and all the text to stay together, but neither worked. I'd like the tables to adjust for various screen and font sizes, so I didn't set a "td width" value. In theory, the td width should adjust to the size of the largest item in it, but it's not doing that.

I'm really an amateur and I've been looking at this so long, I can't see straight. Any help would be greatly appreciated. The page is here: http://www.christinemacleod.net/test5.htm

Thanks in advance,
Kim
pandy
Actually, FF also wraps the text, so I guess you only looked in IE. It seems like FF and whatever browser your friend uses don't consider   between images or images and text as glue. IE and Opera do.

There are several ways you can do this, but with the markup you have now these two are the simplest. Either give that TD a width that's wide enough for the text not to wrap. Or, probably better, use 'white-space: nowrap' with p.navbar. In both cases remove those   .
LadyBugAbode
Thank you SO much, Pandy!!! I used the "white-space" option, and it worked like a charm. I really can't thank you enough. I'm thrilled to have learned a new trick, and I can't tell you how appreciative I am that you took the time to look at my code and come up with a solution!

Thanks a million!!!
Kim

QUOTE(pandy @ Jun 20 2008, 06:09 AM) *

Actually, FF also wraps the text, so I guess you only looked in IE. It seems like FF and whatever browser your friend uses don't consider   between images or images and text as glue. IE and Opera do.

There are several ways you can do this, but with the markup you have now these two are the simplest. Either give that TD a width that's wide enough for the text not to wrap. Or, probably better, use 'white-space: nowrap' with p.navbar. In both cases remove those   .

pandy
No problem. You are welcome. smile.gif
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2010 Invision Power Services, Inc.