Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Page 1 of 2 1 2 LastLast
Results 1 to 10 of 11
  1. #1
    Junior Member
    Join Date
    Jun 2006
    Location
    Sheerness, Kent, UK
    Posts
    16
    Member #
    13338
    Hi all - just joined the forum and this is my first post,

    Basically, I have a website where I've set the background to black for aesthetic reasons.

    I've entered the alt attribute text for all images on my website as I now design my sites for W3C compliancy and the text is displayed in black.

    So you can see my problem. Technically my site is W3C compliant on the pages where I've entered the alt attribute text - but it's as much use as a chocolate teapot. Anyone who needs/wants the alt attribute text is going to be sadly disappointed.

    I'd like to change the colour of the text but don't know how/if this is possible. The only thing I've thought of that might work is to define a class in my style sheet, set the font colour to something that will show up on black and then use <span class> around the alt attribute text. Even if this works, it doesn't seem that elegant a way to achieve the result I need.

    Is there any other way - or any way at all - to achieve what I want?

    Cheers,

    Shaun

  2.  

  3. #2
    Senior Member Arkette's Avatar
    Join Date
    Jan 2006
    Location
    Europe
    Posts
    102
    Member #
    12297
    There is something odd going on here because alt text should always appear in box with black text on a pale background and 1px border. Could we have a link please?
    End of Line.

  4. #3
    Junior Member
    Join Date
    Jun 2006
    Location
    Sheerness, Kent, UK
    Posts
    16
    Member #
    13338

  5. #4
    Senior Member minute44's Avatar
    Join Date
    Mar 2006
    Location
    Nottingham, UK
    Posts
    264
    Member #
    12849
    Garrrrrrrrrr lol

    Works Fine in IE. Black text, cream background with 1px border.

    My FF doesn't display alt text at all for some reason but I think that's more to do with my browser.
    No ma'am, we in IT don't have a sense of humor we're aware of.

  6. #5
    Junior Member
    Join Date
    Jun 2006
    Location
    Sheerness, Kent, UK
    Posts
    16
    Member #
    13338
    Cheers for the feedback.

    The problem seems to be that browsers deal with alt attribute text in different ways. IE creates little text boxes but you only see these if you happen to hover over the place where the image is - otherwise you wouldn't know they were there if you don't load the images.

    On browsers like FF, Opera and Netscape they don't seem to create the text boxes but do put the text on the screen - unfortunately in the same colour as I want my background to be. It's ok for the images that are also links - they get displayed in blue so you know they are there. The images that aren't also links are the problem.

    Hence why I'd like to know if it's possible to change the colour of the alt attribute text and how best to do it if it can be done.

  7. #6
    Senior Member Arkette's Avatar
    Join Date
    Jan 2006
    Location
    Europe
    Posts
    102
    Member #
    12297
    If you want the little box to appear in firefox then you have to use the title attribute as well as the alt attribute. W3C defines the alt attribute for alternative browser outputs i.e. screen speakers for the blind MS implements it in the same way as the title attribute but mozilla doesn't
    End of Line.

  8. #7
    Senior Member audiofreak9's Avatar
    Join Date
    Apr 2005
    Location
    NJ
    Posts
    339
    Member #
    9584
    What about assigning an id or class to the <p> element that contains your images. Then assign a lighter background color to that id or class with a width and height. The image will typically cover the lighter background color, but if the image is not used/missing then the black alt text would show up.

  9. #8
    Junior Member
    Join Date
    Jun 2006
    Location
    Sheerness, Kent, UK
    Posts
    16
    Member #
    13338
    Quote Originally Posted by audiofreak9
    What about assigning an id or class to the <p> element that contains your images. Then assign a lighter background color to that id or class with a width and height. The image will typically cover the lighter background color, but if the image is not used/missing then the black alt text would show up.
    That is an alternative that has occurred to me that I could use since posting my initial message. I may just give that a go and see if that works.

  10. #9
    Senior Member audiofreak9's Avatar
    Join Date
    Apr 2005
    Location
    NJ
    Posts
    339
    Member #
    9584
    I was gonna create a test page to see if it works well, but if your gonna give it a try, let us know if it works...

  11. #10
    Junior Member
    Join Date
    Jun 2006
    Location
    Sheerness, Kent, UK
    Posts
    16
    Member #
    13338
    Quote Originally Posted by audiofreak9
    I was gonna create a test page to see if it works well, but if your gonna give it a try, let us know if it works...
    OK, I've done an initial draft on the Home Page only. See what you think:-

    http://www.sheppeypirates.org/index.htm

    but I've only tested it in Firefox so far.


Page 1 of 2 1 2 LastLast

Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 02:46 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com