| You are here: DEVPPL ‹ Forum ‹ Programming ‹ CSS Forum ‹ Script-archive |
NOTIFICATIONS
|
|
|||||||||||||||
Login |
Basics
3 posts
• Page 1 of 1
0
Basics
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
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
- Shinz
- Reputation: 0
- Posts: 289
- Joined: Thu Aug 26, 2004 5:06 pm
- Location: PS7+C4D=Love
- Highscores: 0
- Arcade winning challenges: 0
0
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?
<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?
- Nighthawk
- Reputation: 0
- Posts: 419
- Joined: Sun Jun 11, 2006 2:53 pm
- Location: SFRJ
- Highscores: 0
- Arcade winning challenges: 0
0
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.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?
[url=http://www.linkedin.com/profile/view?id=96243938]Meet me on LinkedIn[/url]
[img]http://www.devppl.com/images/facebook_icon_small.jpg[/img] Help DEVPPL grow, [url=http://www.facebook.com/pages/DEVPPL/140524279390050]like DEVPPL on facebook[/url]!
[img]http://www.devppl.com/images/facebook_icon_small.jpg[/img] Help DEVPPL grow, [url=http://www.facebook.com/pages/DEVPPL/140524279390050]like DEVPPL on facebook[/url]!
- Rasmus Lindström
- Site Admin
- Reputation: 18
- Posts: 2830
- Joined: Tue Aug 17, 2004 2:07 pm
- Location: Sweden
- Highscores: 1
- Arcade winning challenges: 0
|
|