It appears you have not yet registered with DEVPPL. To register please click here... (it's fast, easy and free!)

Forum

Log In Sponsors
Board index Programming CSS Forum Script-archive

Basics

Share your completed scripts.

Basics

Postby Shinz on Tue Nov 23, 2004 2:02 am

I will now list the basics of Cascadding stylesheets ( or commonly, CSS)
anything in italics defines the action of the script (remember this all goes in the <head> of your html document

<style type="text/css"> (states you'r about to use css)
<!-- (hides the css code from browsers that dont support it)
Body (indicates the section to be stylized)
{ (starts the styling code for the section)
Background-color: ######; (indicates background color of section, always remember if more than one style is being used seperate by a ; mark)
Border: 1px solid ######; (indicates border width, style, and color)
Font-size: #px; (indicates font size of section)
Font-Family: *insert font*; (indicates font of section, *note each sections font should be defined, not just in the Body section* )
color: ######; (indicates color of font of section)
--> (stops hiding the script)
</style> (ends the css script)

any questions PM me
User avatar
Shinz
250+ Club
 
Posts: 289
Joined: Thu Aug 26, 2004 4:06 pm
Location: PS7+C4D=Love

Postby nighthawk on Thu Jul 06, 2006 10:14 pm

Or you can make separate file - filename.css, and in head put this
<link type="text/css" rel="stylesheet" href="url" />

But what is the difference between these two ways?

I use the second one because the html source code is shorter, and you can use the same .css file on many pages.

which browsers don't support css?
User avatar
nighthawk
250+ Club
 
Posts: 420
Joined: Sun Jun 11, 2006 1:53 pm
Location: SFRJ

Postby webmaster on Fri Jul 07, 2006 8:26 am

nighthawk wrote:Or you can make separate file - filename.css, and in head put this
<link type="text/css" rel="stylesheet" href="url" />

But what is the difference between these two ways?

I use the second one because the html source code is shorter, and you can use the same .css file on many pages.

which browsers don't support css?
The difference between having the CSS included or excluded in the file is that if you exclude it to a file. The users gets faster browsing because their browser caches the .css-file. If it's included in the header, it gets loaded for each pageview on the site. So if you do a CSS/DIV layout, and use as much CSS as HTML code in your documents. You can reduce the loadingtimes to 50% for all pageviews except from the first one.
Make sure to check out our TNX Review and Link Vault Review
User avatar
webmaster
Site Admin
 
Posts: 2695
Joined: Tue Aug 17, 2004 1:07 pm
Location: Sweden


Who is online

Users browsing this forum: No registered users and 0 guests