| | #1 |
| I don't like you. | Okay, this is a simple and easy tutorial for CSS (cascading style sheets). I'm not super good myself, so please correct any mistakes you see. Good luck. Part 1 - Introduction Here are a few points to know before starting CSS: CSS means 'Cascading Style Sheets', and allows you to set the properties for a CSS class you assign to elements of your webpage. It is an extremely useful tool to use in web design, if used correctly. --------- Okay, moving on now to important things... When you start CSS you usually see tons of confusing values. I'll give a quick definition on those:
Part 2 - Using CSS This part we're going to learn how to use CSS. Yay. Now, before even doing anything, we're going start by using the ';' and '{/}' tags. Code: body {
background:#000;
color:#fff;
} In CSS, you can setup the coding in two different ways. Examples: 1 Code: body {background:#000;color:#fff;} Code: body {
background:#000;
color:#fff;
} Also, when using HEX codes in CSS, you must always have the # symbol before the hex number. Now that you have a basic understanding on how to write CSS and how to use the tags, we can move onto actually using CSS. Part 4 - Background and text Now that we know the attributes and values, we can put all of it into action! We're going to start off with background. Background is a very important part of CSS as it's the color/image behind the main content. Without a background, a webpage would look incomplete. Text is another important feature. I think you know why we need text in CSS, but you don't know how to use it. Code: body {
background:#000;
color:#fff;
font-family:"Helvetica", "Arial", "Bitstream Vera Sans", "Verdana", sans-serif;
font-size:93.3%;
} So that's basically what that is. For the font-family, the font choices must only be browser known fonts. So you can't use some font made on another website, as the browser will not recognize it. Part 5 - Links (a) Links in CSS are known as 'a'. In HTML, a link means 'a: href', but this is a much simpler and easier version. Anyway, 'a' is another important thing in CSS. You may see it like this in the actual code: Code: a {
color:#0C79A5;
text-decoration:none;
} Code: a:hover {
color:#0A6F9D;
text-decoration:none;
} Part 6 - Paddings and Margins Okay, paddings and margins in CSS can be quite tricky, so be careful. Anyway, if read through the list of stuff in CSS then you should know what these mean, if not, go read again. Anyway, I'm going to use this for my board wrapper: Code: #wrap {
background:#fff;
border:1px solid #3D97BB;
margin:0 2% 30px;
} As you can see, the margin is 2% for the wrapper. Let's say I want it to be smaller? Easy, increase the percentage of the margin % and it will decrease in width. What if I want it bigger? The decrease it. Paddings... I'm not an expert at, so I can't really say much about them.. I'll refer you to this guide. Well, I guess that's the end until I edit with other stuff I might have missed. Hope this helped you get a basic understanding of CSS. Last edited by Salty; August 29th, 2009 at 04:54 AM. |
![]() | |
| | #2 |
| timebomb Join Date: May 2007 Posts: 2,470
Rep Power: 6 ![]() ![]() Currently playing: Final Fantasy Tactics Advanced, Super Mario Galaxy, Big Bang Mini Level: 22 EXP: | you really did go only for the bare basics :v good job though. I didn't know you dealt with coding. |
![]() | |
| | #3 |
| timebomb Join Date: May 2007 Posts: 2,470
Rep Power: 6 ![]() ![]() Currently playing: Final Fantasy Tactics Advanced, Super Mario Galaxy, Big Bang Mini Level: 22 EXP: | also, you should learn the DIV style of CSS. it's a lot cleaner and easier to manage, really |
![]() | |
| | #4 |
| I don't like you. | Yeah, feel free to edit and shit, I know I've forgotten tons of stuff since I made this at 12 AM :/ |
![]() | |
| | #5 |
| timebomb Join Date: May 2007 Posts: 2,470
Rep Power: 6 ![]() ![]() Currently playing: Final Fantasy Tactics Advanced, Super Mario Galaxy, Big Bang Mini Level: 22 EXP: | |
![]() | |
| | #6 |
| I don't like you. | Then I'll just edit myself... This would be easier to make if I made a tut explaining how to make a webpage and stuff. >_> |
![]() | |
| | #7 |
| timebomb Join Date: May 2007 Posts: 2,470
Rep Power: 6 ![]() ![]() Currently playing: Final Fantasy Tactics Advanced, Super Mario Galaxy, Big Bang Mini Level: 22 EXP: | |
![]() | |
![]() |
| Thread Tools | |
| Display Modes | |
| |