Wrox Programmer Forums
|
HTML Code Clinic Do you have some HTML code you'd like to share and get suggestions from others for tweaking or improving it? This discussion is the place.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the HTML Code Clinic section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old May 19th, 2005, 07:33 AM
Friend of Wrox
 
Join Date: Mar 2004
Posts: 357
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to anshul
Default #FFF or #FFFFFF

Wanna ask if we use 3-code color because we can write quickly -n- save typing? Is it compatible2all browsers?
__________________
`~@#\^%&*/\.<.\/-|+|_!:;..=?>
PHP, SEO | anshul shrivastava | mediasworks.org | FB
 
Old May 19th, 2005, 07:54 AM
richard.york's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 1,706
Thanks: 0
Thanked 6 Times in 6 Posts
Default

The three digit hexadecimal short-hand represents a smaller subset of colors deemed to be web-safe, or in other words, colors that are gauranteed to work on a display only capable of displaying 256 colors. The benefit of this is to eliminate dithering, which happens when colors outside of that 216 are used and is when the OS tries to simulate a color by combining colors that it knows how to display to create a color that it is not capable of displaying. There are 216 possible colors using this shorthand, minus 40 which are OS reserved. Those forty colors vary from operating system to operating system.

This feature is supported amongst all the popular browsers.

HTH!

Regards,
Rich

--
[http://www.smilingsouls.net]
Mail_IMAP: A PHP/C-Client/PEAR solution for webmail
Author: Beginning CSS: Cascading Style Sheets For Web Design
 
Old May 24th, 2005, 05:36 AM
Friend of Wrox
 
Join Date: Mar 2004
Posts: 357
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to anshul
Default

Friends, I've found <td bgcolor="#FF0"> is wrong. This method ( 3-code representation ) has no problem in <style>.

 
Old May 24th, 2005, 05:41 AM
Friend of Wrox
 
Join Date: Jul 2003
Posts: 683
Thanks: 0
Thanked 1 Time in 1 Post
Default

Hi Anshul,

Try <td style="background-color: #FF0;">

Cheers,

Chris










Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.