Tutorials & Script Homepage
Style Sheets 1 to 6
Style Sheets: Intro. Part 1
Style Sheets: Intro. Part 2
Primer Part 1
Primer Part 2
Primer Part 3
Primer Part 4
advertisment
advertisement
advertisement
Host With Us: HostingHelper.co.uk From Only $5.00p/m
Spotted an Error ? Let us Know
100's more FREE templates at FreeWebTemplates
Looking for a new Web Host ?
Free templates from TemplatesLand
Professional High-End Templates
TemplateBox.com more FREE templates
Free Flash Templates and Intros
advertisement
 
STYLE SHEETS NUMBER : 05
Please Click Here, and Help Keep This Site FREE to Use
 
Please click on our sponsors advert to the right if you download or use anything from this page.
Thank you for your help.

CSS Primer (Part 3)

	<HEAD>
	  <STYLE TYPE="text/css">
	  <!--
	  BODY { background: red; color: black }
	  H3 	{ font-family:Lucida;
	         font-style:normal; color:green }
	  -->
	  </STYLE>
	</HEAD>
	
	<BODY>
	  <H3><FONT COLOR="Blue">
	  This is not a love song!</FONT>
	  </H3>
	</BODY>

The answer: Blue. That's because the font color instructions are closer to the affected text than the CSS-controlled H3. Proximity to the affected content always wins.

Bend the rules
The rules of priority and inheritance make good sense, but there are bound to be times when you want to override them and make a parent or warring style win. To do that, just add ! important to the end of the style, and it'll whip any competition:

	H1 {color: teal ! important; }

Distinguishing DIV from SPAN
As you dig into style sheets, you'll notice these two unfamiliar tags appear frequently. SPAN was invented solely so CSS users would have a nondestructive place to hang their attributes; DIV has existed for a while. It's used to demarcate the presence of any kind of new object on a page. The biggest difference between them is that DIV is a block-level element and implies a line break, whereas SPAN does not affect the flow of the page.

Turn off underlining
Most HTML authors have at some point wondered how to turn off hyperlink underlining. Until now, that's been impossible. With style sheets, it's as easy as attaching "text-decoration: none" to an Anchor style, like this:

	A:link { color: cornsilk; 
	         text-decoration: none}

The thin blue line
To add a touch of design to an otherwise text-heavy page, surround a few paragraphs with a thin, color border to set them off. To add this to all your paragraphs, create a style in your document header (see example below) and then just use your normal <P> tags.

	P { border-style:solid; 
	    border-width:thin; 
	    border-color:blue; }

Nail it down
In HTML, the position of any object--text, graphic, or multimedia component--is relative to the rest of the page's structure. If you add a paragraph to your intro, your prize graphic could end up below the fold--out of eyesight on the first page view. CSS changes all that, not just by letting you state every object's exact location (in pixels, inches, or points), but also by letting you hammer it into place for good. Give an object an absolute position, and it will be there, no matter what other text or graphics are competing for that spot. Here's how to do this:

CSS Primer (Part 1) | CSS Primer (Part 2) | CSS Primer (Part 3) | CSS Primer (Part 4)

Web Hosting  |  Membership website templates  |  Reliable UK Web Hosting  |  Dallas Web Design  |  Art Web Templates  |  Cheap Flight Deals  |  Free Web Hosting  |  UK Web Hosting Company  |  Coursework Writing  |  Reseller Hosting  |  Directory Submission Service  |  Cheap UK Web Hosting  |   Youth hostels  |  Web Design  |  Low Cost Domain Names  |  Windows Hosting ASP.NET  |  Website templates  |  Broadband Reseller  |  Dedicated Server  |  Business Broadband  |  Professionelt webdesign firma - webbureau  |  Austin Web Design  |  Flash Templates  |   SEO Services India  |  Flash Intros  |  Web Templates  |  Cheap Web Hosting  |  Hyper-V Hosting  |  Website Templates  |  Corporate Logo Design Service  |  SEO  |  UK Dedicated Server Hosting  |  Best Web hosting  |  Bespoke Software Development  |  Domain Name Registration  |   Free Web Hosting  |  UK Web Hosting  |  Dating Software - aeDating 4.1  |  Flash Templates  |  Website Templates  |  Power Saver  |  Website Design Quote  |  Flash templates  |  cctv cameras  |  SEO  |  Web Templates  |  Web Design uk  |   Flash templates  |  Cheap Web Hosting Deal  |  Linux Hosting  |  Web Design uk  |  Web Hosting  |  Business web directory  |  Accept Credit Cards  |  Mobile Phone Contracts  |  Car Rental Deals  |  Free domain names  |  Business Email  |  Best UK web Hosting  |  

 
advertisment
advertisment
advertisment
advertisment
  Top-end templates
  Credit Cards
  Reseller web hosting UK
  free flash tutorials
  Web Hosting
  Hosting Directory
  Corporate Gifts
  Company Logos
  Christian Designs
  Website Templates
  Website Templates
  Web Hosting UK
  Free Web Templates
  Custom site design
  Domain Names
  Logo Design Pro UK
  Free Flash
  templatebox.com
  freewebtemplates.com
  templatesland.com
  topfreegraphics.com
  freegraphicland.com
  free-templates-layouts
  Ink & Toner Cartridges
  Layouts4Free
  Webmaster Resoucres
  Web Templates Factory
  Free Web Templates
  Free Templates Catalog
  Web Templates
  Reseller Web Hosting
  Stock Photography
  Animations-galore.com
  4print.com.au
  Host Review
  Web Hosting Host Color
  Dedicated Servers
  FlashTemplateDesign
  ZeroDollarTemplates
  Killersites.com
  how-to-build-websites
  Build a free website
  web Hosting
  Business Logo Design
  Templates Favpage
  webmastermind.de
  flasheasy.com
  More Featured Sites