alright, i'm learning CSS, please help me!
do i define all the CSS styles for my ENTIRE site from one file? is this called xxx.css? do i save this file in the same folder as the rest of my site?
or do i do a style sheet and put it on every one of my pages? do i just put the <style type="text/css"> then put in all my commands then </style> and that's it?
maybe i'm extremely stupid, but i am just not getting this
do i have to reference my style sheet in my code somwhere? if you check the source code from someones page, how do you know where their style sheet is?
thank you, i'm sorry to be so dumb, but apparently style sheets are they way togo nowRead through some of the topics here, there are links to a number of CSS tutorial sites. Learn the basics first and the rest will follow over time.
Your styles can be local, ie on the page in question, or in one or more separate style sheets. You may, for example have a set of styles common to everything, another set purely for screen display and a further set for hardcopy printout.<style type="text/css" media="screen">@import "layout.css";</style> you can use an external css file or you can put all your stuff on each page inbetween the <style> tags and not use an external file, its either or. Or even define it on the elements. Like <div style="border:1px solid black;">Just found out replying to two topics at once crashes my machine
In the <head> of the document you could have, for example:
<LINK href=http://www.webdeveloper.com/forum/archive/index.php/"styles/common.css" rel="stylesheet" type="text/css">
<LINK href=http://www.webdeveloper.com/forum/archive/index.php/"styles/screen.css" media="screen" rel="stylesheet" type="text/css">
<LINK href=http://www.webdeveloper.com/forum/archive/index.php/"styles/print.css" media="print" rel="stylesheet" type="text/css">
where the three xxx.css files are in a folder called styles. They contain styles in the same format as you would see inside the <style> definitions.how does this code look?
<!-- m --><a class="postlink" href="http://antachmotorsports.com/avi/home.htmlIt's">http://antachmotorsports.com/avi/home.htmlIt's</a><!-- m --> not so much how the code looks, it contains numerous things that need attention so that it looks as you intended in all browsers and screen resolutions. Consider the following:
1.The page is too wide for screens at 800x600
2. Put your styles inside comments <-- --> so that browsers that do not render CSS do not display the text of your styles.
3. Use of Tables for layout is depreciated, that's what CSS is for
4. Why have you split your Styles into two groups, with a Script in between ?
5. Run your site through the validator at <!-- m --><a class="postlink" href="http://jigsaw.w3.org/css-validator/validator-uri.html">http://jigsaw.w3.org/css-validator/validator-uri.html</a><!-- m --> and correct the errors. Let us know when you have done this, then we can take another look.
do i define all the CSS styles for my ENTIRE site from one file? is this called xxx.css? do i save this file in the same folder as the rest of my site?
or do i do a style sheet and put it on every one of my pages? do i just put the <style type="text/css"> then put in all my commands then </style> and that's it?
maybe i'm extremely stupid, but i am just not getting this
do i have to reference my style sheet in my code somwhere? if you check the source code from someones page, how do you know where their style sheet is?
thank you, i'm sorry to be so dumb, but apparently style sheets are they way togo nowRead through some of the topics here, there are links to a number of CSS tutorial sites. Learn the basics first and the rest will follow over time.
Your styles can be local, ie on the page in question, or in one or more separate style sheets. You may, for example have a set of styles common to everything, another set purely for screen display and a further set for hardcopy printout.<style type="text/css" media="screen">@import "layout.css";</style> you can use an external css file or you can put all your stuff on each page inbetween the <style> tags and not use an external file, its either or. Or even define it on the elements. Like <div style="border:1px solid black;">Just found out replying to two topics at once crashes my machine
In the <head> of the document you could have, for example:
<LINK href=http://www.webdeveloper.com/forum/archive/index.php/"styles/common.css" rel="stylesheet" type="text/css">
<LINK href=http://www.webdeveloper.com/forum/archive/index.php/"styles/screen.css" media="screen" rel="stylesheet" type="text/css">
<LINK href=http://www.webdeveloper.com/forum/archive/index.php/"styles/print.css" media="print" rel="stylesheet" type="text/css">
where the three xxx.css files are in a folder called styles. They contain styles in the same format as you would see inside the <style> definitions.how does this code look?
<!-- m --><a class="postlink" href="http://antachmotorsports.com/avi/home.htmlIt's">http://antachmotorsports.com/avi/home.htmlIt's</a><!-- m --> not so much how the code looks, it contains numerous things that need attention so that it looks as you intended in all browsers and screen resolutions. Consider the following:
1.The page is too wide for screens at 800x600
2. Put your styles inside comments <-- --> so that browsers that do not render CSS do not display the text of your styles.
3. Use of Tables for layout is depreciated, that's what CSS is for
4. Why have you split your Styles into two groups, with a Script in between ?
5. Run your site through the validator at <!-- m --><a class="postlink" href="http://jigsaw.w3.org/css-validator/validator-uri.html">http://jigsaw.w3.org/css-validator/validator-uri.html</a><!-- m --> and correct the errors. Let us know when you have done this, then we can take another look.