Welcome to Dream.In.Code
Getting Help is Easy!

Join 132,162 Programmers for FREE! Get instant access to thousands of experts, tutorials, code snippets, and more! There are 1,723 people online right now. Registration is fast and FREE... Join Now!




Functionality of Style Sheets

 
Reply to this topicStart new topic

Functionality of Style Sheets

Torres58
post 5 Jul, 2008 - 01:23 AM
Post #1


New D.I.C Head

*
Joined: 4 Jul, 2008
Posts: 1

There are 3 basic ways to add the functionality of Style Sheets:

1. Inline - Creating the elements for each HTML Tag. This will allow the same HTML Tag to have different styles on the same page.
2. Embedding - Creating the elements on the page itself that will affect every occurrence of an HTML Tag.
3. Linking - Creating one page that defines the elements and include in the pages that you want to affect.

For Website design services using Embedding or Linking is recommended.. The Linking Style is used when you want to use the same style on multiple pages, you can then use Embedding and/or Inline on specific pages that don't fit the design style of the Linking Sheet. <H4>Precedence and inheritance</H4> as the term Cascading Style Sheets implies, more than one style sheet can be used on the same document, with different levels of importance. Generally styles from different style sheets merge together (cascade) into a virtual style.

However, if you define conflicting styles for the same HTML element, the innermost definition--the one closest to the individual tag-wins the precedence Style Sheets follow is Inline, Embedding, and then Linking. Inline Style takes precedence over Embedding Style, which takes precedence over Linking Style. There is a fourth style sheet which is set not by the document author but by the reader and that is the browser default. Taking this style sheet into consideration the order of precedence is: Inline Style (inside HTML element), Embedding Style Sheet (inside the <head> tag), External Style Sheet and Browser default. So, an inline style (inside an HTML element) has the highest priority, which means that it will override every style declared inside the <head> tag, in an external style sheet, and in a browser (a default value).
User is offlineProfile CardPM

Go to the top of the page

gabehabe
post 5 Jul, 2008 - 08:02 AM
Post #2


Working Girl.

Group Icon
Joined: 6 Feb, 2008
Posts: 5,402



Thanked 94 times

Dream Kudos: 2625

Expert In: Dingleberries

My Contributions


Welcome to </dream.in.code> Torres58 smile.gif

I'm gonna go ahead and pin this for a while, I think a few people may find it pretty useful icon_up.gif
User is offlineProfile CardPM

Go to the top of the page

Bort
post 21 Aug, 2008 - 06:38 AM
Post #3


D.I.C Regular

Group Icon
Joined: 18 Sep, 2006
Posts: 394



Thanked 4 times

Dream Kudos: 350
My Contributions


Torres, expand on this and stick it in the Tutorials section. I found it pretty useful, although further explanations could be handy.

Bort
User is offlineProfile CardPM

Go to the top of the page

Fast ReplyReply to this topicStart new topic
Time is now: 11/21/08 02:23PM

Live Help!

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

Bye Bye Ads

Free DIC T-Shirt

T-Shirt Example

Related Sites

Monthly Drawing

Thumb Drive

Partners

Top Contributors

Top 10 Kudos This Month