Creating a basic CSS file
Complete tutorial on making your CSS

Follow the steps provided, and you'll have a generic CSS file you've created all yourself. If you skip any steps, you will have things missing on you stylesheet you might've wanted to have, so follow the steps vigorously!

Step 1: Starting / Finishing Your Stylesheet
To begin, paste this at the beginning of your stylesheet:

You will write all your code below this. After you have written your code, you must close the css with this (I will remind you of this at the end of this tutorial also.)





Step 2: The generic body style
The body style sets a general appearance for how your page will look. This includes font style and a background.

Let's decode the above. The first part of the code sets the font color and size of your text. You can leave it verdana, or change it to whatever font you like. But please be careful to make sure that people will have that font on their computer already, or provide a link to exactly where they can download it to view your site. Next, The font size and line height I don't really understand too well. But it works fine and makes the text a good size. For an example, that's the size of my text you see on my site. Now for the background image. Change BACKGROUND.NAME to the URL of your background. background-attachment: fixed; makes it so your background doesn't scroll. So if its an image, it stays in one place and the text scrolls on it instead of with it. If you'd like your background to scroll with your text, remove 'fixed' from the code.



Step 3: Making a style for your links.
You can change the way all of your links look with a few simple styles. A:link, being what your links look like normally. A:visited is how your links will look once they are clicked on once. A:active is what your links look like when they are clicked. A:hover is how they look when you have your mouse on them.

You can change the colors to fit your layout. This specific style underlines the link when the mouse hovers over it. For changing the color, use the same directions as above. For text-decoration you can use any font style, such as underline, italic, bold, strikeout, etc.



Step 4: Forms and Textareas
These are what you would find on contact forms, comment forms, and anywhere you would want a textarea. The code that is displayed on this page in boxes are in textareas. Be sure to customize everything to your liking!





Step 5: Closing Tag
I told you I would remind you of this! Place this after all the code you have written, if you haven't done so already.





Note: I'm sure you want to get rid of that ugly colors of the scroll bar, and change the colors of it, right? Technically this isn't XHTML correct, so if you care about validating your css, don't put scrollbar attributes in your stylesheet. If you don't care, then go for it! So here's the code for that.

Customize the colors how you would like. Basically, you can use the word, or the hex code, provided you know it. If you use a hex code, you have to leave the # in front of the numbers. One note though, don't make them all the same color. Otherwise you won't see the scrollbar at all but a color. Play around until you find a combination you like for your scrollbar.

That is your basic CSS file, including scrollbar colors, link colors, style for the text on your page, and textareas/buttons.

I know this can be really confusing for first time coders. Questions? Submit them here!

Back | Home | Forward


Navigation


Welcome
Welcome to Hello-Love.net, my personal place on the net for posting my daily rants, sharing my thoughts, and ideas. Take a look around, you might find something you like. I make an effort to validate my pages for both CSS and HTML, but my site is most optimized for Firefox, so if you're an IE user, beware! You have a chance of seeing errors around the site!


My Quilt AIM: ItsAmbrosity MSN: xamberlums@hotmail.com  Email me! Myspace: Youngxatheart  LastFM: ItsAmbrosity Flickr: ItsAmbrosity
online | Visitors
Since March '07



Webcams

AmberCam PetCam



Calendar

September 2008
M T W T F S S
1234567
891011121314
15161718192021
22232425262728
2930EC



Loved


Hostees
Bonnie

Affiliates
Amber
Amberlynn
Angie
Ashhh
Brandy
Christina
Cory
Daniel
Erin
Jenny
Jessica
Kate
Kilanda
Lisa
Meesh
Paris

More Links / Apply

I recently did an Affie check! If you're removed from this list, be sure to check under "More Links" to see if your link was moved to there. If not, you can still reapply!




Statistics
Posts: 87
Comments: 413
Categories:
Last Post: Hiatus Until Mid-September
Last Commenter: Charley
Last Modified: August 10, 2008 @ 8:47 pm (GMT -6)




Twitter


Disclaimer
Everything found here is copyrighted by me unless otherwise stated. If it belongs to you, just simply email me using the form above, and you will be properly credited. If you don't like it here, pleasy kindly click the in the top right corner of your screen. Do NOT direct link! That is considered bandwidth theft, which is a crime, and it's easy to get caught! Confused? Read me.

Powered by Wordpress    CSS Valid    HTML Valid    RSS Feed    Linux Server    Bookmark Me!

Too Cool for IE





Admin

This stuff is not for you!
IPs are LOGGED!
CPanel . Wordpress . MyQuilt