Home
Our Services:
Web Portfolio
E-Commerce
Database Application
Search Engine
Placement

Compass Point Bio
Compass Point Philosophy

Resources:
Knowledge Base
Internet Primer
Web Projects Workflow
Sample Site Features
Sample Applications


Advanced Projects:
Web Services
Universal Database

News:
Newsletter
Internet Updates
Press

Site Map
Contact Us

 


 

Using CSS to control tightly-nested text and images
------------------------------------------------------------



Back to Knowledge Base

Another good reason for Cascading Style sheets is the ability to control font size, whatever the user chooses in Microsoft Internet Explorer (I'm not sure if this works in Netscape because I haven't tested it, but you can do that fairly easily).

I discovered this recently when text on a page I had designed "blew out," or separated some images that I had sliced up (for more information see my articles on using Dreamweaver Ultadev, my choice of WYSIWYG), even though I'd set the font to Verdana, size ="-1". Verdana -1 is a relatively small font, and -2 is even smaller, but they can become HUGE if the viewer goes into View > Text Size > Largest. To get an idea, go to www.armadoceros.com/correct.htm (one of my sites). Try and change the font size-can't be done. But, go to www.armadoceros.com/blowout.htm and try changing the font sizes in your browser.

My solution was adding this line into my linked css stylesheet:

Body, TD {font-family:Verdana, Arial;font-size:9pt;}

If you don't use linked stylesheets, you can place this tag in the <head> of your document:

<style>
Body, TD {font-family:Verdana, Arial;font-size:9pt;}
</style>

I realize that there are times when you still WANT the user to control the size of the font. The good news is that you can still specify a -1 size for fonts you allow change on, and it will override the 9pt specification. But using CSS guarantees you will not separate images that are tightly mixed with text.

Further Resources:
A CSS Tutorial
Dreamweaver Articles Index