SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Wizard
    Join Date
    Oct 2005
    Location
    London
    Posts
    1,678
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    styling alt text

    Hi there,

    Im wondering if i can style my alt text so that when images are disabled i can have some additional control over how the bare page looks.

    Ive tried the following css code but it doesnt seem to work:

    Code:
    #box img alt { font-size: 10px;
                         line height: 12px;}
    any ideas?

  2. #2
    SitePoint Author silver trophybronze trophy

    Join Date
    Nov 2004
    Location
    Ankh-Morpork
    Posts
    12,159
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Browsers seem to allow different degrees of styling for text equivalents. You can usually style colours (background and foreground) and sometimes text size.
    Birnam wood is come to Dunsinane

  3. #3
    SitePoint Wizard
    Join Date
    Oct 2005
    Location
    London
    Posts
    1,678
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    ok nice one. Is my code the right way of going about it then?

  4. #4
    ☆★☆★ silver trophy vgarcia's Avatar
    Join Date
    Jan 2002
    Location
    in transition
    Posts
    21,236
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)
    IE doesn't let you do anything with alt text.

    Other browsers tend to take on the style of the elements they're contained in. For example, if you have an image in an H1 and you disable images, the text will show up in the same way you styled your H1.

    If you're talking about styling the "tooltip", then no you can't do that, and only IE shows alt text as a tooltip.


Bookmarks

Posting Permissions

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