Preview
Download

Secret Service Wars
Want to Advertise here? Contact Us


Home
Forums
Awards for You
Winners
Awards Won
About Us
Past Layouts
Past Updates


Site Rules
Site FAQ
Site Staff
Credits
Link to Us
Link Exchange
Linkage
Affiliation


Latest Contest
Previous Contest
Contest Winners
Mini Contests
General Rules


100x100 Icons
64x64 Icons
70x70 Icons
AIM Icons
Archived Icons


Signatures
Buttons
Banners
Wallpapers
Enter Signs
Hiatus Signs
LJ Headers
Friends Only Banners


Div Layer
Tables
iFrames
PopUp


Brushes
Extractions
Vectors
Icon Bases
Icon Creator


HTML Tutorials
CSS Turoials
Let's Make a Layout
Graphics Tutorials
Do's and Don'ts











Bassman Themes

Let's Make a Layout

When I FIRST started making layouts I didn't touch CSS, I didn't know what it meant let alone how to use it. I use those damned page builders that did everything for me. Now... there isn't a layout that goes out that doesn't include CSS. It's a handy tool that's simple to use, and can make a website move from alright to wow.
While there are many different functions of CSS that can be done, for our layout we're going to use it to change the scroll bars, the fonts, the link colors and simple effect for hover as well as adding a repeating background.

As you noticed back in the first part we decided to link to an outside style sheet, for doing this we need to now create this style sheet. Much like with HTML we can do this in Notepad. Open notepad. (Your you can forget learning how to do it on your own and get one of those fancy creators. Still a stickler for learning it myself I am. If you don't want to, why are you reading this?)
And so with a fresh notpad open let's begin.

Whenever saving this file the extension should be .css In the case of this layout we called our style sheet style. So the file name for this particular case would be style.css You need to remember to save it as such or it will not work.

Unlike with HTML there is no real set beginning to the file, but there are tags. HTML tags are opened with a < and closed with a > and the command is inside <body> but CSS tags are opened with { and closed with } with the command on the outside body { }
When adding properties to the command, in HTML and CSS they are included within the opens and closes.
And so beginning we need to type

body {
}

Spacing is important, when you space correctly you can read your tags easier. Much easier.
After each property we add we add a ; (For more about properties see CSS 101)
In our body we want to change the scrollbars, add the background, change the margin at the top of the page and left of the page and change the MAIN PAGE font. (Note there is a difference between the main page font and the div layer font)
So let's start with the background color. This is anywhere there is no background image we want the background that color.
In our case the background color is white.

body {
background-color: #FFFFFF;
}

Next we want to change the margins. WE don't want a top margin, and we want the left margin at five. This is going to affect the positioning over our div layers so be sure to go back and correct those (Corrections: Id Content - Left: 84px Top: 495px -- ID Links - Left: 526px Top: 65px -- A general reduction by 10px should set it back to where it was. )

body {
background-color: #FFFFFF;
margin-top:0px;
margin-left:0px;

}

Now we have our background color and margins time to put our background image in.

body {
background-color: #FFFFFF;
margin-top:0px;
margin-left:0px;
background: url('/images/bg.jpg') repeat-y;
}

As you may have noticed this line is a little more complicated. When using an image the background: url('') should never change. Keep in mind this is a style sheet for all pages on the site so we want to have that / root slash, and then the folder where the image is located, followed by the name of the image. If the image is in the root director it would look like this ('/bg.jpg')
The parts after are what create's our repeating effect. If you noticed the background was VERY small, this helps in that the image is quick to load and seeing as it's really only lines it's not needed to be large at all.
WE however only want the background to repeat under the image and NOT anywhere else on the page. (So not to the side of our layout.) To do this we add repeat-y to the code. This will make the image repeat down but NOT to the side. IF we wanted it to repeat to the side and not down we would do repeat-x

Next is the Scrollbars for the page.
I've never been one to really learn what each piece does in the scrollbars properties, I tend to fiddle until I get what I like. It's something I'd recomend doing.
These are the properties and the colors are the ones I would choose to use.

body {
background-color: #FFFFFF;
margin-top:0px;
margin-left:0px;
background: url('/images/bg.jpg') repeat-y;
scrollbar-DarkShadow-Color:#FFFFFF;
scrollbar-Track-Color:#FFFFFF;
scrollbar-Face-Color:#FCD6FA;
scrollbar-Shadow-Color: #F8A7F4;
scrollbar-3dLight-Color: #F8A7F4;
scrollbar-Highlight-Color: #FFFFFF;
scrollbar-Arrow-Color: #F8A7F4;

}

Next is the font property. We change it here incase something isn't inside the div and we add it in. However we'll be changing it for the div as well.

body {
background-color: #FFFFFF;
margin-top:0px;
margin-left:0px;
background: url('/images/bg.jpg') repeat-y;
scrollbar-DarkShadow-Color:#FFFFFF;
scrollbar-Track-Color:#FFFFFF;
scrollbar-Face-Color:#FCD6FA;
scrollbar-Shadow-Color: #F8A7F4;
scrollbar-3dLight-Color: #F8A7F4;
scrollbar-Highlight-Color: #FFFFFF;
scrollbar-Arrow-Color: #F8A7F4;
font-size: 13px;
}

In HTML we tend to make our fonts larger or smaller by going <font size=+3>This however is BAD practice. It's better to set the font in the CSS and use that as only a highlighting measure, and even then don't use it. It'll not really aid your design any. But of course this is your choice. HTML uses smaller numbers where as CSS uses pixels... and thus the number is larger. Keep in mind people like me are getting old and size 8px font is NOT a font to be used on a website. Size 12px or 13px is small enough. For this design I recommend 13px.

Our Next CSS code will be the div
We need to open our div tag and close it

div {
}

A good practice is to use the div properties the same as the td and p properties. To do this we simply add a comma and the other name. (That is of course unless you want them different, but if you want them the same, inlcude them here.

div, td, p{
}

This will just make those areas the same as the div, if you don't want them the same, don't include them (If you don't know what these are refer back to Html 202)
Now the properties to include here are the font size, family and color. A font family is also referred to commonly as type or face. In HTML we call it font face in CSS we call it font family.
We'll start by changing the font color.

div {
color: #A5339E;
}

You can use whatever color suits your fancy, #A5339E is the color I've chosen to use for this layout. Remember the ; at the end. ^_~ The next part is adding in the font size. Remember 8px font is FAR too small, try and keep it reasonable without making it huge. We're not blind but we also don't have x-ray vision.
Play with the numbers till you get what you want. Personally 13px... is PLENTY small... and can even be considered TOO small.

div {
color: #A5339E;
font-size: 13px;
}

Once you have this set (Play with it till you get what you're looking for) you can add in the font family.
**Note you may notice after you change the font size your area for your divs is too big or too small adjust to your tastes. (Div Id Links width: 180)

div {
color: #A5339E;
font-size: 13px;
font-family: Verdana;
}

The font family can be anything you want, but a few things to keep in mind. Not everyone has the same fonts on their computer. Some are new to newer versions of Office and Windows, and some are downloaded. If the person doesn't have the font it will result to the default for their computer, often Times New Roman. Which honestly isn't a pretty font.
It's best to set it to ones like Aria, Verdana, Comic Sans MS(Despite how much I hate that font)
Also you can set more than one font, so that if the person does not have the primary choice it'll go to the secondary.
font-family: Verdana, Arial, Comic Sans MS;

Righto, we now have our div, td and P set up as we want, we need to set the links. Everyone likes fancy links.
I never get over the fact that people seem to like links with underlines. I HATE underlines but this isn't me... this is you. So here we go.
Links have four properties Link, Active, Visited, Hover. HTML can modify the colors of Link, active and visited, but it can not manage the colors of the hover. Besides CSS just does it better and gives you more options.
We're going to stick to a simple color change, line remove/add and pretty hover effect (More on Link properties can be found in CSS 101)

Most often people decide to have the visited, active and regular link properties the same throughout the file. At which point we can combine the different properties so as not to type the same thing out. We'll start by showing you what it looks like seperate and then what it looks like combined.
For testing purposes you'll need to go back into your HTML file and make some links in the navigation area. (For help on adding links refer to HTML 101)

This is them seperate:

A:link {
}

A:active {
}

A:visited {
}

This is them all together:

A:link, A:active, A:visited {
}

The reason you would want them all seperate is if you decided that the links would look different after they had been visited or that they would look different when they are clicked. The properties for them are all the same, and so for the purpose of this design we want the link, active and visited to all remain the same.
The first thing we're going to do is change the color of the link. The bright blue which is the default for a link will not match our layout. So our link color will be a moderate purple color.

A:link, A:active, A:visited {
color: #591494;
}

The #591494 color is a moderate purple color that I chose for the layout. Now instead of being the standard blue color the links will be the color I've chosen. The next part is to add the type of text decoration that is desired. By default links are underlined. Personally I don't like underlined, I like none. (For types of text decorations see CSS 101)

A:link, A:active, A:visited {
color: #591494;
text-decoration: none;
}

By setting the text-decoration to none there will be no lines anywhere on the link it'll just be like it was normal text, but a different color so it still stands out.
Some people find they don't like the underline, but they still want the link to stand out by more than just color, we're going to accomplish this by changing the letter spacing.

A:link, A:active, A:visited {
color: #591494;
text-decoration: none;
letter-spacing:2px;
}

This will space the letters apart more and make the links stand out. You can change the pixels to your tastes but keep in mind the size of the area you're working with and the overall appearance. I would not recommend ANYTHING higher than Five for anytype of letter spacing.
There are other properties you can add to your links such as you can make them italics, bolded, you can change the word spacing as change the font type and size of them. We're however not doing that =P

The next step is to add our hover.

A:hover {
}

Hover is completely optional but will allow a user to see it's a link because it's not dull or flat, it moves and adds an overall elegant feel to the site.
A few hints and tips of GOOD WEBDESIGN. Do not make a hover where the text grows, if you do this your LAYOUT WILL MOVE if your layout moves it becomes difficult to click the link the visitor will become annoyed and no longer take the time to view the website. Good design suggests you only make the link change, and thus if your links are bold, don't make them hover bold. If your links are 12px don't make the hover 14px it'll only make the webpage move. However you must learn this on your own.
For the purpose of this layout we will be adding a different color to the hover, a text-decoration of an overline and underline as well as ensuring our letter spacing is consistant with the rest at 2px.
First is the color.

A:hover {
color: #5F3CF8;
}

The #5F3CF8 color is a light blue color that I've chosen to use for this portion of the layout. You can change it to many different things. Some people like to make the link almost invisible. Some like to make it completely disappear, play with it.
The next part is to add in our text decoration.

A:hover {
color: #5F3CF8;
text-decoration: underline overline;
}

When you're adding a text decoration, you do not place comma's to seperate what each part is. If you want only an underline, just don't include the overline part, or overline alone, or perhaps you still want it to be none, then you type none.
Our last part is the letter spacing. We want to be sure the letter spacing isn't going to size down on us.

A:hover {
color: #5F3CF8;
text-decoration: underline overline;
letter-spacing:2px;
}

So we set the letter-spacing back to 2px... you CAN change this, but like I said bad design because your layout will move with the links. Your choice however.

Finally we're done what we've chosen to do in the CSS and we can add in the finishing touches.
Our CSS code looks like this:

Our HTML code looks something like this (Depends on how you added your navigation):

Our Site looks something like this (Once again depends on your navigation and colors):

So onto the Next Part!

Let's Make a Layout Part One :: Getting Started
Let's Make a Layout Part Two :: Div Layers
Let's Make a Layout Part Three :: CSS (You are Here)
Let's Make a Layout Part Four :: Final Touches.