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 : 06
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 4)

	.OurLogo { position:absolute; 
	           left:30px; 
	           top:10px;
	           width:40px; 
	           height:30px; 
	           color:red;
	           font-size:12pt; 
	           background: black;
	           border:1pt red dotted; }

So if you can nail down objects, what happens when you try and put two objects in one place on the screen? Objects simply stack up on top of one another quite gracefully. The default stacking order says that the first item laid down will land on the bottom of the pile, and the last will be on top. But you can change the stacking order by altering the "z-index" attribute as follows:

	<DIV CLASS="pile" ID="image1" STYLE="z-index: 3">
	<DIV CLASS="heap" ID="image2" STYLE="z-index: 2">

In this example, image1 is on the bottom and image2 is on the top. You can use any integer (positive or negative) for your z-index, but the highest number will always come out on the bottom and the lowest on top. Try letting a few objects overlap just slightly for some fascinating design effects.

Let your light shine through
Stacked objects can look great, if you plan properly, because your objects' native transparencies are respected. Letters can be seen through transparent .GIFs and vice versa. If that's not exactly what you had in mind, don't forget you also have control over the background properties for every rule. These backgrounds are all valid:

	H1       { background-color: #000080; }
	.OurLogo { background-color: transparent; }
	BODY     { background-image: url(/images/foo.gif); }

Magic static backgrounds
When a page scrolls, everything on that page scrolls with it, right? Not necessarily. With CSS, you simply tag the fixed argument to an object to make that object hold its position on the page, even as text and images scroll past or over it. Here's how:

	BODY { background : cyan url(dali.jpg) fixed }

NOTE: This feature is available in IE 4 and later only.

It's the "fixed" part that nails things down. This, of course, will work with anything that takes a background.

Don't break older browsers
CSS was designed to integrate seamlessly with existing HTML, so it won't break old browsers. Still, it's possible to create CSS pages that look terrible in older browsers. The trick to is to build your pages in straight HTML using a 3.0 or earlier browser. Then apply your styles to that document and fine-tune it. Older browsers will ignore new tags they don't understand, and the CSS syntax will override the existing HTML, as long as you apply your styles in the right order.

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

Web Hosting  |  Membership website templates  |  Dallas Web Design  |  Text Link Adds  |  Art Web Templates  |  Cheap Flight Deals  |  Domain Name Hosting  |  Digital Camera  |  Coursework Writing  |   Youth hostels  |  Internet Marketing  |  Web Design  |  Low Cost Domain Names  |  Burial Life Insurance  |  Website templates  |  Broadband Reseller  |  Dedicated Server  |  Business Broadband  |  Professionelt webdesign firma - webbureau  |  ATX Web Design - Texas TX  |  Flash Templates  |   tablet notebook  |  Machinery moving Los Angeles  |  Flash Intros  |  Web Templates  |  epi suite software  |  Cheap Web Hosting  |  web hosting  |  Website Templates  |  Corporate Logo Design Service  |  ID card printers  |  id cards  |   Free Web Hosting  |  UK Web Hosting  |  Dating Software - aeDating 4.1  |  Flash Templates  |  Website Templates  |  Power Saver  |  Website Design Quote  |  Flash templates  |  cctv cameras  |  Web Design Manchester  |  Web Templates  |   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  |  Web Designer Delhi  |  video surveillance systems  |  

 
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