View Single Post
Old Jul 3rd, 2009, 10:43 AM   #6
GeekSquad23
Programmer of 2009
 
GeekSquad23's Avatar
 
Join Date: Jul 2009
Posts: 27
Rep Power: 0 GeekSquad23 is on a distinguished road
Post Re: writing good css

If you need help with CSS then read the information that I wrote bellow.

Part 1/5: How to Organize your CSS Script
If you want to get better at CSS, well you better read this. A good way to organize your CSS is by separating the script with a quote.
For example:

***Content Box Script***
#box {
background-color: #FFFFFF;
padding: 5px;
border: 1px #000000 solid;
}
***End Content Box Script***

You can right CSS like that to help you understand why you put the following script. If you right your CSS like that, then you are an organized person. Not just you that is organized, but also your CSS script is organized. Remember to put the stars between the quote or else the web browser will read the quote as CSS.

Part 2/5: Using CSS with HTML (No style tags)
The first thing that you got to remember is don't use the "<style>" tag in HTML because what if you have 3 types of HTML files and they all have "<style>" tags in them (Style tags are used for storing CSS in HTML). A couple of days later you want to change the CSS of the website. DO YOU WANT TO GO TO EVERY HTML FILE AND EDIT THE CSS? NO!!! You will get SICK of it. Anyways, back to using CSS with HTML.

1. Create a new folder (You can name the folder anything)
2. Inside the folder that you made, create a ".css" file and a ".html" file (or ".htm")
3. Open your HTML file and paste the code bellow into the html file

<html>
<head>
<title><!---Your title goes here---></title>

<!---Bellow is the code that tells the web server that you are using a css file to use--->
<link rel="stylesheet" type="text/css" href="filename.css" />
</head>
<body>



</body>
</html>


Okay, now I want go to the CSS file and start typing while you read "part 3" and "part 4" of this guide.

Attention: The guide will be finished on a video and will be displayed on my website (funtut.com) and I will post the video on YouTube (FuntutOnline@youtube.com). If you want to ask questions email me (Funtut@ymail.com).
__________________
Free Online Tutorials | Linux Community
GeekSquad23 is offline   Reply With Quote