Go Back   WebDev Answers > Web Development Discussion > CSS

Reply
 
LinkBack Thread Tools Search this Thread Display Modes

  #1 (permalink)  
Old 07-19-2008, 10:07 AM
Novack36 Novack36 is offline
Junior Member
 
Join Date: Jul 2008
Posts: 1
Default Functionality of Style Sheets

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).


Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads for: Functionality of Style Sheets
Thread Thread Starter Forum Replies Last Post
Css Style sheets help? titchyc CSS 0 11-29-2007 08:38 PM
CSS Style Sheets and more? Elanessea CSS 1 09-15-2007 02:48 PM
Cascading Style sheets? Woodsy CSS 1 05-14-2007 12:51 PM
Cascading Style Sheets help? g_playa_gent CSS 2 04-09-2007 12:03 AM
Using CSS (Cascading Style Sheets)? AMDG CSS 2 04-09-2007 12:03 AM



All times are GMT. The time now is 04:44 AM.

Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.0.0 RC8 ©2007, Crawlability, Inc.