|MySQL Conference and Expo April 14-17, 2008, Santa Clara, CA|
Hack #43. Overriding eBay's Fonts and Styles
Use Cascading Style Sheets to change the look of more than just the description.
The following code, for instance, will turn all text on the page green:
Here's how it works. First, the
The actual styles applied are listed between the curly braces
If you feel that making all text the same color is a little drastic, you can customize it further:
This sets all ordinary text blue, except for links, which will appear orange
(this will look pretty awful, by the way). Note the absence of
TIP: For a complete list of all the CSS styles you can use, you'll need dedicated CSS documentation such as Cascading Style Sheets: The Definitive Guide (O'Reilly), or the official W3C CSS specification (www.w3.org/Style/CSS/).
You can also use this technique to alter other aspects of the page. Don't like the blue shading section headers? Well, you can do something like this:
You may find this particular solution somewhat extreme, since it removes the shading used in every table on the page. But it will give you a taste of the power of CSS.
See Hack #41 for further auction-page hacking.
Override Other Sellers' Hacks
You'll eventually encounter an auction that has been hacked up pretty well, possibly by a seller with even worse taste than you. Fortunately, you may still have some control over the pages you view with your own browser.
TIP: Have you ever opened a page with a text/background combination that rendered the page nearly impossible to read? Here's a quick fix: just press Ctrl-A to highlight all text on the page. This will make all text appear white on a dark blue background, which will likely be a significant improvement.
You can set your browser preferences to favor your own color choices over those made by web site designers, but this can be a pain to turn on and off as needed. Instead, you may wish to set up a user stylesheet, a set of carefully constructed preferences and rules that will trump any crazy code like the stuff at the beginning of this hack. User stylesheets are supported by Netscape 6.x/Mozilla 1.x and later, and Internet Explorer 5.x and later.
Probably the best source for information about user stylesheets is Eric Meyer's CSS Anarchist's Cookbook. There, you'll find ways to "wreck" tables, disable banner ads, and render font coding pretty much useless, all worthwhile pursuits for the anarchist in each of us.