Low End Mac Reader Specials
Memory To Go Special: MacPro 8 Core 8GB kit $232 / 4GB kit $116 / 2GB kit $72. New Macbook 2GB DDR3-$65. HARD DRIVES available -- Free shipping / LIfetime warranty.
Download Typestyler, still the Ultimate Styling Tool for Internet, Print and Video Graphics. Works great in Classic with a Native OS X Version on the way. Free Tryout: www.typestyler.com
LA Computer Company: Specials on AppleCare, iMac's, MacBook Pros and more. Optical Drives for Apple iBooks, Powerbooks, MacBooks, MacBook Pros in Stock. Call 1-800-941-7654 Click Here.
Other World Computing: Big Deals on Big LCDs: 23" 'TrueHD' up to 2048x1152 + USB2 Hub & WebCam $279.99. Specials on 20" to 30" from $167.99. Freight from only $3.95!
Don't install Parallels to play poker online! Poker Mac will show you how
to download and install a native Mac poker application such as Full
Tilt Poker Mac.
Laptop Hardware Provided by TechRestore - Overnight Mac & iPod Repairs.
Compare products like desktop computers, apple laptops, apple macs, and LCD Monitors side by side! All the information and reviews to make the best purchasing decision for new mobile phones, sat nav systems, or MP3 players. The Ciao online shopping community makes searching products easy for you.
Low End Mac's Online Tech Journal
Web Design, Part 3
Cascading Style Sheets
Dan Knight - 2000.03.16
There's a real danger in web design: the desire to have too much control over what your site visitor sees. There are webmasters who construct their site using very complex style sheets, JavaScript, or separately coded pages for different browsers. And as each new browser ships, the designer has to figure out how to make the site work identically.
I don't work that way on Low End Mac or any of the other sites I'm involved with. I don't try to control exact type size, screen width, or much else. My site exists to make information available, not to show off my design or programming skills.
Not that I couldn't do that or haven't made misguided attempts to take more control over site appearance. But through trial and error, I've discovered that the page that looks great in Internet Explorer has real problems in Netscape, or vice versa. That's the danger of wanting too much design control.
Typefaces
I learned early on that if you want to control what font your pages appear in, you can't simply use a <FONT FACE="Verdana"> command. If the visitor doesn't have Verdana, they'll see it in their default font, which is usually something like Times. (As a book designer, I prefer a serif typeface such as Sabon when designing for the printed page. However, on the computer screen, a sans serif font such as Verdana is superior.)
Looking at the Low End Mac home page from April 1997, I see that I was already using the conventional solution: listing a set of alternate fonts. The command <FONT FACE="Verdana,Arial,Helvetica"> meant that the visitor would see my site in Verdana if it was available, then try for Arial, and go to Helvetica if both were missing. In retrospect, I should have concluded with Sans Serif, forcing the browser to use whatever sans serif typeface the user or programmer had set as the default. That's a lesson I learned a bit later.
The great drawback of using so many typefaces is HTML bloat: each and every line that I wanted to appear with these fonts contained the instruction <FONT FACE="Verdana,Arial,Helvetica">. That's about 30 bytes of extra code for each paragraph on a page.
There had to be a better way.
Cascading Style Sheets
There is a better way. It's called Cascading Style Sheets (CSS). There's a huge standard with lots of variables that should give the web designer a lot of control - except that different browsers work differently. You have to carefully choose what command you use and which variables you use with them or all your work will create a great IE page and a terrible Netscape one. I know; I've done it.
Cascading Style Sheets allow you to create a master set of type instructions for a document. You might specify that all type use "verdana, geneva, helvetica, arial, sans-serif" as available, that certain headers appear centered or in a specific color, and a whole lot more.
By trial and error, I discovered that the safest way to specify font size so it works across platforms is to use <FONT SIZE="xx">, where xx is a number between -2 and +4. Attempts to specify size in points, pixels, or even the absolute sizes of 1 through 7 didn't work consistently on different browsers.
The worst thing I ever did, though, was trying to decrease the indentation of bullet lists from 2 picas to one. I believe my code looked great in Internet Explorer, moving everything to the left one pica (one-sixth of an inch), but on Netscape it moved the text one pica to the left of the regular text column. It was not pretty.
For a while I experimented with having the hover command (where your mouse is over a link) reverse the text on a colored field - until a site visitor told me that had a tendency to blow up Netscape. Oops.
At this point, I use CSS heavily. Every page on the site is linked to an external style sheet. The beauty of this system is that by modifying a handful of individual files, I can quickly change the appearance of Low End Mac or any subsection of the site. In fact, I did that most recently on March 15, when I switched from the deep blue accent color with blue links and a blue logo to a deep green accent color, green links, and a St. Patrick's Day logo (to be replaced with a plain logo on March 18.)
No, I didn't make all those changes using CSS, but I did use CSS to change the color of the links. For the rest, I used BBEdit Lite to go through the entire site and change each appearance of the dark blue color (#000066) to deep green (#006600). BBEdit Lite is an invaluable tool for things like this. I also redid the logo, making sure it was the same size as the previous one and giving it the same name.
Not counting the time it took to find a decent shamrock for the St. Patrick's Day Low End Mac logo, I'd guess I spent under 30 minutes creating a holiday logo, choosing the best web-friendly shade of green to work with it, creating a shamrock free logo for later, updating my pages and style sheets with BBEdit Lite, uploading the changes (I love my new cable modem), seeing a few rough spots, fixing them, and uploading the fixes.
Thirty minutes to a fresh look at Low End Mac thanks to CSS, BBEdit, and Photoshop.
However, at this point I use CSS lightly. There are a lot of things it can define, but because of cross-platform issues, only a handful work reliably and consistently. As long as you want to create a site that's friendly to Mac, Windows, and Unix users on Netscape, iCab, Internet Explorer, or Opera, you are very limited in what you can do.
An Example
Here's one of my style sheets (with comments in red):
BODY, H1, H2, H3, H4, H5, H6, P, OL, DL, UL { font-family: verdana, geneva, helvetica, arial, sans-serif }
This defines the typeface for almost every standard style. The instruction says to use Verdana if available, then go to Geneva, Helvetica, Arial, or the system's default sans-serif typeface as available and in the order listed.
A:link {
text-decoration: none;
color: #060;
}
This says unvisited links should not be underlined (text-decoration: none) and should appear in a deep green. The code #060 is shorthand for #006600. When all three pairs of digits are matching numbers, you can do that to slightly reduce code size.
A:visited {
text-decoration: none;
color: #609;
}
This makes visited links purple and eliminates the underline. (I really like the look of links without underlines.)
A:hover {
text-decoration: none;
color: #C00;
}
This tells the browser to change the link color to red when the mouse is over it. I believe this only works in Internet Explorer.
A:active {
text-decoration: none;
color: #C00;
}
This makes the link red when you click on it.
PRE { font-family: monaco, courier }
This line tells your browser to display preformatted text (monospaced type) using Monaco when available, Courier otherwise.
H4 { color: #060 }
Finally, this line sets the level 4 header to deep green.
In different parts of the site, I use different colors: a strawberry iMac inspired magenta on the iMac Channel, a tangerine iBook inspired orange on the iBook & PowerBook Page, and different sets of colors in yet other areas.
By the way, I use a different style sheet for the "printer friendly" version of pages on Low End Mac. It does use underlines for links and doesn't use any color at all - minimizing the use of color ink when printing out an article while still clarifying where the links are on the printed page.
The Benefits of CSS
The benefits of CSS are many, but the key ones from my perspective are these:
- It degrades very nicely. If the visitor's browser doesn't support CSS, they still see a well designed page. It may not look as pretty, but it's fully functional. For instance, iCab still has no CSS support, but Low End Mac looks just fine in iCab.
- It reduces page size. Designing for an audience that includes people who surf with SE/30s and 14.4 modems, eliminating that string of text in front of every line listing Verdana, Arial, and Helvetica cuts about 30 bytes per paragraph. That adds up quickly. Switching to CSS probably reduced page size by an average of 10-15%. For low end users, that counts for a lot.
- It makes global changes easier. By linking to the same style sheet from dozens or hundreds of pages, I can change their appearance by simply changing the style sheet.
- It gives me enough control over my site's appearance that I can assure every visitor an attractive site without controlling every aspect of presentation. By carefully choosing my code for cross-platform consistency, I achieve just enough control over the look without going overboard.
I'm sure there are other advantages. And I know there are some excellent resources on the Web that can tell you exactly how to implement CSS, the difference between inline CSS and linked files, and a whole lot more.
My intention here is only to expose you to a powerful tool that can
simplify your work as a site designer. To really learn them, you'll
need to read and experiment, avoiding the dangers of creating a site
that only looks good on one or two browsers.
Recent Online Tech Journal Columns
- Optimized Software Builds Bring Out the Best in Your Mac, 06.30. Applications compiled for your Mac's CPU can load more quickly and run faster than ones compiled for universal use.
- Low End Mac's Safe Sleep FAQ, 06.15. What is Safe Sleep mode? Which Macs support it? How can you enable or disable it? And more.
- The Original Macintosh, 01.12. An in-depth look at the original Macintosh and how it shaped future Macs.
- The Innovative Lisa, 01.08. Apple's Lisa and how it paved the way for the Macintosh.
- More in the Online Tech Journal index.
Links for the Day
- Mac of the Day: 'Yikes!' Power Mac G4, Aug. 1999 - The only Power Mac G4 with PCI graphics was built on a modified G3 motherboard.
- Group of the Day: Tiger List is for anyone using Mac OS X 10.4.
- July 4 in LEM history: 00: When Randy met Mac - 08: Wouldn't life be great with an iSlate? - Mac Pro overclocking, Windependence with Darwine, Blu-ray for Macs, and more
- Support Low End Mac
Recent Content on Low End Mac
- iPhone 3GS Overheating, Battery Life App, 240 GB Upgrade for 5G iPod, Total Baby App, and More, iNews Review, 07.02. Also low cost international calls, U-verse remote DVR control, Sync Blocker USB-to-Dock cable, Rocket Taxi improved, and more.
- MacBooks Top Amazon Sales, EFI 1.7 Problems, Pros and Cons of Built-in Batteries, and More, The 'Book Review, 07.02. Also make a bootable SD Card, Leopard on a 9" Dell netbook, MacBook Pro and Air reviews, triple WiFi range, bargain 'Books from $179 to $2,300, and more.
- Apple Tops in Satisfaction Again, Slim Profits on Mac mini, Ultimate Photo Setup, and More, Mac News Review, 07.02. Also tips for cloning hard drives and moving files from old Macs, Clickfree Transformer turns USB drive into a backup drive, maximum Mac Pro RAM, and more.
- Refurb MacBook Pro Deal, Fastest Mac Browser, 256 MB Modules for WallStreet, and More, Charles W. Moore, Miscellaneous Ramblings, 07.01. Also more Safari 4 feedback, praise for Camino, MacBook cracks, looking for Craigslist software for Macs, and more.
- Amazon.com v. Interstate Sales Tax: Everyone Loses, Dan Knight, Mac Musings, 07.01. Amazon.com is standing up to states that are trying to have it collect sales tax on interstate commerce, which most see as a violation of federal law.
- Introduction to Autofs in Mac OS X, Keith Winston, Linux to Mac, 07.01. "Autofs is often used in enterprise environments to set up network-based home directories and other network mounts for users at login."
- Checking Out Safari 4 on an Old PowerBook, Charles W. Moore, 'Book Value, 06.30. Safari 4 is the fastest it's ever been, but it's not without some frustrating drawbacks.
- Intel's Promise Fulfilled: More Processing Power per Processor Cycle, Dan Knight, Mac Musings, 06.30. Apple promised improved CPU efficiencies when it announced the move to Intel in 2005. Three years of MacBooks show the progress.
- Is Steve Jobs' Health Essential to Apple's Future?, Frank Fox, Stop the Noiz, 06.30. Steve Jobs' health is an important thing, but Apple has demonstrated that it can be profitable without him.
- More links in our archive.
Recent Deals
- Best Mac Pro Deals, 07.02. Used 3 GHz 4-core, $2,000; 3.2 8-core, $2,900; refurb 2.8 8-core, $2,399; new 2.66 4-core, $2,290 a/r; 2.26 8-core, $3,070 a/r; 2.66, $4,499; more.
- Best Mac OS X 10.4 'Tiger' Deals, 07.02. Full version DVD, $140; 5 user family pack, $370; 10-user Server, $299.
- Best 17" PowerBook G4 Deals, 07.02. Used 17" 1 GHz PowerBook, $689; 1.67 GHz, $749; hi-res, $1,029.
- Best Xserve Deals, 07.02. Used 2 GHz single G5, $800; dual, $1,000; refurb 2.8 GHz 4-core Xeon, $2,100; new 2.26 4-core Nehalem, $2,888; 8-core, $3,449; 2.66, $4,799; 2.93, $5,999.
- Best iPod touch Deals, 07.01. Refurb 2G/8 GB, $179; 16 GB, $259; iG/32 GB, $279; new 2G/8 GB, $215; 1G 16 GB, $210; 2G, $275; 2G/32 GB, $369. Prices include shipping.
- Best 13" MacBook & MacBook Pro Deals, 07.01. Used 1.83 GHz, $595; 2.0, $629; new 2.0, $889; 2.13, $925 after rebate; refurb 2.0 Unibody, $949; 2.4, $1,099; new 2.26 MBP, $1,119 a/r; more.
- Best 12" PowerBook G4 Deals, 07.01. Used 867 MHz Combo, $400; 1.33 GHz, $448; 1.5 GHz, $599; 1 GHz SuperDrive, $509; 1.33 GHz, $599; 1.5 GHz SD, $679.
- Best Apple TV Deals, 07.01. Refurb 40 GB Apple TV, $199; new, $220; refurb 160 GB, $279; new, $320. Prices include ground shipping.
- Best G4 iBook Deals, 06.29. Used 12" 800 MHz Combo, $290; 1 GHz CD, $299; Combo, $370; 1.33 GHz, $428; 14" 1 GHz Combo, $399; 1.2, $465; 1.42 GHz, $500.
- Best Power Mac G3 and PCI Video Card Deals, 06.29. Used beige 300 MHz, $25; G4/366, $39; blue & white 350, $80; 400, $90; 450, $105; PCI video cards from $15; shipping additional.
- Best Mac OS X 10.0-10.3 Deals, 06.29. Mac OS X 10.0, $30; 10.1, $20; 10.2, $60; 10.3, $50; 10.3 Server, unlimited users, $130.
- Best Time Capsule and AirPort Deals, 06.29. Close-out 500 GB Time Capsule, $199; 1 TB, $350; AirPort Extreme Base Station, $130; refurb AirPort Express, $85.
- More deals in our archive.
About LEM | Support | Usage | Privacy | Contacts
Navigation
Used Mac Dealers
Apple History
Video Cards
Email Lists
Favorite Sites
MacSurfer
MacMinute
MacInTouch
MyAppleMenu
InfoMac
Macs Only!
The Mac Observer
Accelerate Your Mac
RetroMacCast
PB Central
MacWindows
The Vintage Mac
Museum
DealMac
DealsOnTheWeb
Mac2Sell
ramseeker
Mac Driver Museum
JAG's House
System
6 Heaven
System 7 Today
the pickle's Low-End
Mac FAQ
Abandonware
Petition
Mac vs. PC Info
Affiliates
The Apple
Store
Mac
Connection
MacMall
TechRestore
ExperCom
Crucial
Memory
batteries.com
Have a question?
Ask an expert!
Advertise
MacMinute
MacInTouch
MyAppleMenu
InfoMac
Macs Only!
The Mac Observer
Accelerate Your Mac
RetroMacCast
PB Central
MacWindows
The Vintage Mac
Museum
DealMac
DealsOnTheWeb
Mac2Sell
ramseeker
Mac Driver Museum
JAG's House
System 6 Heaven
System 7 Today
the pickle's Low-End
Mac FAQ
Abandonware
Petition
Mac vs. PC Info
Mac Connection
MacMall
TechRestore
ExperCom
Crucial Memory
batteries.com
Ask an expert!
