|
|
|
3G Technology – Promises and Challenges
Introduction
Imagine a situation where you are about to make an important Sales Presentation. You realize that you have brought the wrong presentation slides and you call up your colleague. She immediately emails the file to your 3G terminal and...
Cascading Stylesheets: 5 Reasons To Use CSS
Cascading Stylesheets become more and more important in today's
webdesign.
But before you decide to get started using CSS you should know
why CSS is so important and what its advantages are.
1. The content is separated from the design...
CSS in Flash the return of crisp and legible fonts.
A typical challenge faced by Flash developers like me is getting fonts to look like you want then to. For any project choosing the right font face and size is a process that requires both you and ultimately the client to see eye to eye. In Flash...
"How's Your Sense of Style?"
No, I'm not referring to your wardrobe here, but to cascading style sheets, also known as CSS. Developed by the World Wide Web Consortium, it allows webmasters to separate site layout from the design. CSS is actually a standard for controlling ...
Introduction To Web Technologies
There are literally hundreds of difficult technologies available to the webmaster. Making proper use of these technologies allows the creation of maintainable, efficient and useful web sites. For example, using SSI (server side includes) or CSS...
Making Better Web Graphics that grab your attention and load FAST.
AG Graphics Making Better Web Graphics that grab your attention and load FAST. Volume 1, Issue 1 October 1, 2004 You are subscribed to - Making Better Web Graphics that grab your attention and load FAST. If you wish to be removed, you can find...
Qu'est-ce que l'OMR?
<h2>Qu'est-ce que l'OMR?</h2> L'Optimisation du placement dans les Moteurs de Recherche ou OMR est une série d'activités entreprises dans le but d'améliorer le classement d'un site Web lors de l'utilisation d'un moteur de recherche tel...
Search Engine Friendly Web Design Advice
Online marketers understand the importance of getting top search engine rankings in major search engines. Therefore, they spend many time in optimizing website content, seeking inbound links, and optimizing title and Meta Tags. However, many of...
Smartphones - Beyond Voice to Information and Entertainment
Smartphones are poised to become the information center and entertainment device of choice. Increasing adoption and usage of smartphones bodes well not only for smartphone makers but also for the wireless industry as a whole.
Investments in...
Using External Coding To Improve Search Engine Placement
Do you have lots of JavaScript coding in the header section of your web pages? Do you re-list your CSS styles at the top of every page? Do you have JavaScript coding spread throughout your web pages? If you answered yes to any of these questions...
|
|
| |
|
|
|
|
|
|
DESIGNING WITH STYLE
One important aspect of good design is to give your site a theme and coherence. A great deal of this can be done using a stylesheet.
Using stylesheets is not difficult. In fact it makes the task of designing a website that much easier. However many new designers don't use them.
But before dispelling some of the confusion, let us look at the advantages of using CSS - cascading style sheets.
ADVANTAGES
1) You can use an external stylesheet to control the look and appearance of your whole website, such as the font size, style, and color, the background image, the background color, etc... by changing a single file. You don't need to edit every page.
2) Linking to a stylesheet reduces the size of your web pages and gives you much cleaner HTML code because you don't need to specify the font, color, or "style" of every element on your page.
3) Web pages are displayed differently on different browsers and platforms. For example a 10pt font looks fine on a PC but becomes too small on a Mac. You can use a browser-detection script in the header of your pages which will link to a different stylesheet depending on which browser is being used.
The rest of this article assumes you have a basic understanding of HTML tags, the code behind your web pages. If not you can get our simple HTML tutorial at - http://www.thewebseye.com/HTML.htm.
Now using stylesheets is actually easier than HTML. The main cause of confusion is that you can either link your web pages to an external stylesheet, or you can include the style sheet in the header of individual web pages inside STYLE tags. Web design software does not always make this clear unless you read the HELP pages in detail. Forget your web design software for a moment, because it is easier to understand stylesheets if you take a look under the surface.
An external style sheet can be as simple and powerful as this:
BODY { background-image: url(images/mybackground.gif); background-color: #FFFFFF; }
P { FONT-FAMILY: Verdana, Helvetica, sans-serif; FONT-SIZE: 12pt; COLOR: navy }
You copy and paste the above in Notepad, Wordpad or other text or HTML editor, and save it as "mystyle.css". Put this stylesheet in the same directory as your HTML files. Note the ".css" extension is important. Then you link your
web pages to this stylesheet by putting the following code in the HEAD area of your pages.
< link rel="STYLESHEET" type="text/css" href="mystyle.css" >
It is now easy to change the background image or color of your site by simply changing the variables in the stylesheet. You can also change how the text in your in your website looks Anything in "P" tags on your web pages takes on the "P" attributes specified in the stylesheet. The above will make your pages display Verdana text (and you give the option of Helvetica and sans-serif in case your visitor's computer does not support the first choice) which is 12 pt and navy.
The next source of confusion is the use of the CLASS attribute. But this is also real easy and very powerful. It is best explained by adding another style to our stylesheet explained above.
P.redtext { FONT-FAMILY: Verdana, Helvetica, sans-serif; FONT-SIZE: 12pt; COLOR: red }
Now what this allows you to do is make certain blocks of text red. In your web pages, instead of a simple "P" tag around your text, you would add class="redtext" to the "P" tag and the text inside the tags would be red.
You can have any number of classes and assign classes not only to P tags, but also to your table data TD, your links "A" and any tag contained in the "BODY" of your web pages. And by simply changing the stylesheet you can change the look of your whole site. Are you beginning to see the power of using style?
It is however important to realize Netscape and Internet Explorer deal with stylesheets differently and Netscape does not support them as fully as IE. Netscape basically takes the inheritance a step too far. The only way to find out what goes and what doesn't is by trial and error, however there are a couple of resources which will help you a long way with understanding more about stylesheets. We have listed links to these resources at http://www.thewebseye.com/stylesheets.htm.
With simple stylesheets you should have no problem and they will really help to make sure your site keeps a certain amount of uniformity and cohesion.
About the Author
Richard Igoe - http://www.TheWebsEYE.com. Get his latest Free Website Success Course by sending a blank email to mailto:wsc@quicktell.net and find out whether you have the 6 essentials of a successful site!
|
|
|
|
|
|