 WebmasterCentral60+ Feeds in every niche imaginable. Improve Member Retention. $79 Feeds, FREE for 1 month.
 braincash.com$35 Per Signup. Exlusive Content featuring such stars as Peter North, Lexington Steele to name a few.
 BlueDesignStudios.com We produce premium quality adult
designs at affordable prices. From affiliate sites and paysites, right through to banners, galleries and flash sites
 PythonHi-Def content that will blow your surfers away! 1000+ Hosted Galleries!
 Exclusive Plugins15+ niche plugins of great reality content! Pricing starts at $99 per month! All Plugins Included!
 PluginFeeds.comReality plugins that YOUR members want. Priced very affordably and based on b/w usage. Great stuff.
|
|
Remember CSS?
(Article Contributed By Dino - Posted on July 29th, 2008)
If you have any comments on this article (or any other that appears on PornResource.com), and idea for one you'd like to see written you can email them here. You can also email us with any interesting news items you find on the web or if you'd like some help in our regular Monday Help-a-Pimp section. Got a question? Send it in! We also accept article submissions (subject to editorial changes) for publication. Please mark all email subjects as “Pornresource Question”.
I don’t know about you, but when I first started designing websites, I was completely hooked on the FONT tag. Little did I know at the time that any weird and wonderful font I had on my machine would not be displayed on the surfer’s machine (unless, of course, they had a copy of it too), that all those multiple tags would push the size of my files up beyond reason and that the display times of my sites on even the speedier machines out there would suffer.
Then I discovered Cascading Style Sheets. CSS was added in HTML 4.0 by the World Wide Web Consortium to address various issues with web pages. In the beginning, HTML tags were supposed to define the layout of a document, but as time went on and more tags were added, it became increasingly difficult to separate the document itself from it’s content. One change could wreck the entire page.
CSS allows you to define a standard appearance for various aspects of a webpage. It can be stored in an external file, allowing a change in that file to effect all documents using the sheet, or it can be embedded into a single document HTML. The real breakthrough, however, is it’s first ability mentioned before. With one change to a single text file, an entire site can be altered; something that would take hours or even days with conventional font tags.
Before we get into CSS in detail, there is something that should be covered. Called the “Cascade Order” – this is the preference order that a rendering engine gives to certain elements of a page, and which ones cascade into each other (hence the name of CSS).
(1) Browser default
(2) External Style
(3) Sheet Internal Style Sheet (inside the tag)
(4) Inline Style (inside HTML element)
Basically this is an “order of importance”, with the most important being numbered highest. Looking at this, you can see that an inline style (such as a font tag in the HTML of the document), will override everything, while an internal style sheet will override an external one and the browser’s default settings.
So how do we use it? Here’s our first HTML document using an internal style sheet. I've added spaces so you can see the tags.
< HTML>
< HEAD>
< style type=text/css>
a:link { color: white; font-family: Tahoma; font-size: 8pt; text-decoration:
none; font-weight: bold }
< /style>
< /HEAD>
< BODY>
< A HREF=”http://www.newbiewebmasters.com”>Our Test Link
< /BODY>
< /HTML>
Let’s cover the basics first; internal style sheets are placed between the HEAD tags of a document, and are defined using the < STYLE> tag. The “type=text/css” tells the browser that this is an internal style sheet with no external links (we will cover that in a later article).
Next we come to the nuts and bolts of CSS – its syntax. The CSS syntax is made up of three parts: a selector, a property and a value:
Selector {property: value}
In the above example, the selector is “a:link” – this tells the browser that the following properties are to be applied to all < A HREF> tag linking text. There are many more of these, but for now we’ll just stick with this one.
Next we come to the all-important properties. Each one consists of two parameters; the property name (for instance, “color”) and the value to assign to that property (“white” in the above example). You can either chain these together, separating each one with a semicolon on the same line, or you can give each one a new line, but in either case, they must be terminated by the semicolon.
So, to recap; the above example will set the font color of all text links to white, using the Tahoma font with a point size of 8, remove the underline commonly associated with text links and make them all bold. Cut and paste the above code into your favorite editor and you’ll see what the result is.
Imagine you’ve just included this in your new TGP layout, and on reflection you’ve decided that the links are too small. Using < FONT> tags, you’d have to change every single instance of them to keep the links all looking the same – with CSS, a single change to the Style Sheet itself covers the entire document!
Tomorrow we’ll cover selectors in more detail and brush on the subject of external style sheets. Until then, you can read more about CSS at the W3C school here: http://www.w3schools.com/css/
Till tomorrow, pimps!
Go Back to The Porn Resource
|
|