CASCADING STYLE SHEETS AND SERVER SIDE INCLUDES

Written by Amrit Hallan


Highlight: Below, first we learn how to define individual tags with multiple definitions usingrepparttar Cascading Style Sheets, and then we learn how to include common components on multiple web pages with minimum effort.

We packed up with external Cascading Style Sheets inrepparttar 134579 previous section, and I had mentioned like a sage that their could be a point in your life when you would like to implement different CSS definitions for different sections ofrepparttar 134580 same HTML page. I understand that as you go through these HTML gospels, you're growing wiser and wiser, and your unquenchable thirst for wisdom is attaining new heights. Good!

We userepparttar 134581 CLASS attribute to render different CSS definitions to same tags. Ok, before we move ahead, today I read in an article that tags in an HTML file should be used in small caps so that they can be used in sync withrepparttar 134582 emerging trends like XML etc. So small caps from now on.

Supposing, in one section, we want to look purple, and in another, we want to look black. If we do it inrepparttar 134583 usual

a { font-size : 10 pt; font-family : Arial; font-weight : bold; color : Purple; text-decoration : none; }

a:hover { font-size : 10 pt; font-family : Arial; font-weight : bold; color : Purple; text-decoration : underline; }

manner, we'll only have a purple colored tag becauserepparttar 134584 definition is applied universally. So what do we do. We uses "classes" in this manner:

a.sec1 { font-size : 10 pt; font-family : Arial; font-weight : bold; color : purple; text-decoration : none; }

a.sec1:hover { font-size : 10 pt; font-family : Arial; font-weight : bold; color : purple; text-decoration : underline; }

a.sec2 { font-size : 10 pt; font-family : Arial; font-weight : bold; color : black; text-decoration : none; }

a.sec2:hover { font-size : 10 pt; font-family : Arial; font-weight : bold; color : black; text-decoration : underline; }

If you'rerepparttar 134585 noticing type, you'll noticerepparttar 134586 use of sec1 and sec2, which we can take asrepparttar 134587 two sections. We execute these definitions inrepparttar 134588 HTML page somewhat like this:

To seerepparttar 134589 site ofrepparttar 134590 immortals, click this purple text.

NAVIGATION BAR AND BULLETED LISTS

Written by Amrit Hallan


Next, we are going to learn to make a navigation bar so thatrepparttar Web site becomes "navigable", and then we learn to present point-wise information inrepparttar 134578 form of "Bulleted Lists".

A proper navigation isrepparttar 134579 backbone of your Web site's success onrepparttar 134580 Net. If you wantrepparttar 134581 visitors to be able to access allrepparttar 134582 information you want them to be able to access, you got to provide them with a consistent modus operandi for doing it. And that modus operandi has to be present throughoutrepparttar 134583 web site.

A navigation bar can be onrepparttar 134584 top, atrepparttar 134585 bottom, onrepparttar 134586 left, onrepparttar 134587 right, or inrepparttar 134588 middle, in whichever way it suitsrepparttar 134589 look of your entire design.

The ideal is, either onrepparttar 134590 top, or onrepparttar 134591 left hand side.

What we generally do is, after insertingrepparttar 134592 logo etc. atrepparttar 134593 top, we define a table of two columns.

< d>

desired changes inrepparttar 134599 template, keeprepparttar 134600 common code intact, and saverepparttar 134601 modified file as your own file.

Make ample use ofrepparttar 134602 comment tag so that you know where you are putting what, especially if you are working with multiple table and column definitions.

"leftnav.inc" can berepparttar 134603 included file that hasrepparttar 134604 following HTML code:

Cont'd on page 2 ==>

 
ImproveHomeLife.com © 2005
Terms of Use