http://www.webmasterworld.com Welcome to WebmasterWorld Guest from 38.103.63.17
register, login, search, glossary, subscribe, help, library, PubCon, announcements , recent posts, unanswered posts
Accredited PayPal World Seller
Home / Forums Index / Browser Side World / CSS
Forum Library : Charter : Moderators: DrDoc & Robin reala & SuzyUK

CSS

  
CSS toolbar with images and text
bigcounty2


#:3544398
 10:05 pm on Jan. 9, 2008 (utc 0)

I am trying to make a multiple line horizontal toolbar that contains both images and test. Each 'tool' is just a link to something like 'Print Article', 'Save to Favorites', etc. The tool has an image and text next to it displaying the title. The text next to the image needs to be able to be on two lines. So for 'Save to Favorites', the top line would be 'Save to' and the bottom line would be 'Favorites'. Also, there could be as many as 10 to 15 of these tools, so the ones that don't fit, should wrap to the next line.

I have tried lots of different methods, but the closest I could come is putting each tool in it's own table. The image would fall in one <td></td> tag, and the title would go in another <td></td> tag. This gives me the look of the text to the right of the image, and the text easily able to be properly on two lines. Unfortunately the only way to get tables next to each other is to float them left, which takes away from the tools being centered within a div. Not a huge deal when there are a lot of the tools, but occasionally only one or two will show up, which makes the non-centered look very obvious and out of place. Also, because the the image and the text are in separate columns, I have to use two identical link tags; one for the image and the same one for the text. Obviously this is not ideal either.

Does anyone have any ideas of how this can be done properly?

encyclo


#:3559970
 8:04 pm on Jan. 28, 2008 (utc 0)

Welcome to WebmasterWorld bigcounty2. :) Rather than using tables, have you tried using a definition list instead? You will need float in the same way, but a definition list helps regroup elements within one container.

 

Home / Forums Index / Browser Side World / CSS
All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About
WebmasterWorld ® and PubCon ® are a Registered Trademarks of WebmasterWorld Inc.
© WebmasterWorld Inc. / SearchEngineWorld 1996-2008 all rights reserved