Register for your free account! | Forgot your password?

Go Back   elitepvpers > Off-Topics > Tutorials
You last visited: Today at 03:09

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



[Guide]How to make ur own CO Website. (CSS)!!!!

Discussion on [Guide]How to make ur own CO Website. (CSS)!!!! within the Tutorials forum part of the Off-Topics category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Oct 2010
Posts: 148
Received Thanks: 57
Talking [Guide]How to make ur own CO Website. (CSS)!!!!

---------------------------------------
Introducing.
First you need to have some knowledge what html and css is.
I would recommend this site.


Thought Im learning aspx with c# atm. at school, I will make guide for
that later.
Im using w3schools to look up on things, when I get confused etc.
This guide is for making a simple Conquer Online Website.

Now when u know what html and css is (Dont need much knowledge, just some general).
I will not go in intern css, as thats really bad to use.
I prefer extern css.
Then your read to continue to next step.
----------------------------------------

Now you need some editor for making html etc.
I would suggest Visual Web developer, if u dont got Visual Studio.
Is alittle different, but same functionalities, of what im gonna show.

You can download Visual Web developer here.


Now when u got what u need, then were ready to continue.
Lets start with the skeleton for your page.

First we need a folder for your website.
Make one folder.


Now were ready to start, open your editor.
Choose File > New > File.
Then choose a Html page.


Now you will get a page, should look like this:
PHP Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<
html xmlns="http://www.w3.org/1999/xhtml" >
<
head>
    <
title>Untitled Page</title>
</
head>
<
body>

</
body>
</
html
Now find
PHP Code:
    <title>Untitled Page</title
Change it to what ever you server name is.
I called mine:
PHP Code:
    <title>CO Website</title
Always remember to do that first, when your making a website or a new page.
Now we got a base html file.
How does it look in the browser?
Well, lets save the file first.
File > Save as > Your website folder.
I have called mine index.htm
Well, as there is nothing on our website, then is empty.


Well, now we need a base design of our website, so lets make a simple css design.
With a header, a menu and a footer.
Will look something like this:


Well, how do we make things like that?
Isn't it just use tables?
Tables are a bad idea to use and they can't control your site enough.
It will make it confused for ur self.
Thats where css is awsome.
Then we just work with div, wich is a boxtype.
Is build up this way:


Now lets make a div for every thing we got on our page.
Simplest way is make it look like this:
inside <body> </body>
also Im using class, is easier to control for whole pages.
As classes can be used more then once.
Where ids can only be used one time.
So lets use classes.
put a div for the whole page:
PHP Code:
<div class="page">

<!-- 
This is the whole page-->

</
div
Now we got a div wich control the whole page.
Now next step is to make one for header, menu, content and footer.
So lets do that.
When your done it should look like something like this in body.
PHP Code:
<body>
<
div class="page">

<!-- 
This is the whole page-->
<
div class="header">
<!-- 
This is the header-->
</
div>
<
div class="menu">
<!-- 
This is the menu-->
</
div>
<
div class="content">
<!-- 
This is the content-->
</
div>
<
div class="footer">
<!-- 
This is the footer-->
</
div>

</
div>
</
body
Okay next step is to make it looks like a page.
Go to File > New > StyleSheet.
Now were gonna look at css.
I will make a simple one with grayboxes and black background.
So I have something to work of.
How do I get ids and classes then?
PHP Code:
.classname/*Gets the class named classname*/
{
}
#idname/*Gets the id named idname*/
{
}
name/*Gets all tags using name*/
{

As were using class then we use.
PHP Code:
.classname/*Gets the class named classname*/
{
}
name/*Gets all tags using name*/
{

Well the first thing we do is making one called body.
Wich is the whole page.
To make it background black, just type in something like this.
PHP Code:
body
{
    
background-colorBlack;

Now save the css file as Style.css in your folder.
Now we need to make our page work with the css file.
Go to your html page.
and find:
PHP Code:
<title>CO Website</title
under that, we need a link, that ref to the css page.
Use this, if name is Style.css:
PHP Code:
<link rel="Stylesheet" type="text/css" href="Style.css" />
<!-- 
Ref to our css page --> 
Now were connecting to the css page.
It should look like this now:


Woohoo, it works, we got a blackpage, wich is controlled from our css page.
Awsome right?
That u can work extern.
I love css so much for that u only have to edit something 1 time and not on all pages,
like if ur working with tables.

Well lets continue on our website.
Now we need some text in it.
I will just write a general plain content that you could use.
And explain what I did after.
Style.css
PHP Code:
body
{
    
background-colorBlack;
}
h1
{
    
text-align:center;
}
.
page
{
    
width:800px;
    
margin:auto;
}
.
header
{
    
width:800px;
    
border:1px solid black;
    
background-colorGray;
}
.
menu
{
    
padding10px 10px 10px 10px;
    
width:150px;
    
margin:0px;
    
border:1px solid black;
    
background-colorGray;
    
float:left;
}

.
content
{
    
padding:10px 10px 10px 10px;
    
width:600px;
    
margin:0px;
    
border:1px solid black;
    
background-colorwhite
    
float:right;
}

.
footer 
{
    
positionrelative;
    
margin-top: -150px;
    
height30px;
    
clear:both;
    
background-colorGray;    
    
width:800px;

Index.htm
PHP Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<
html xmlns="http://www.w3.org/1999/xhtml" >
<
head>
    <
title>CO Website</title>
    <
link rel="Stylesheet" type="text/css" href="Style.css" />
</
head>
<
body>
<
div class="page">

<!-- 
This is the whole page-->
<
div class="header">
<!-- 
This is the header-->
<
h1>CO Website</h1>
</
div>
<
div class="menu">
<!-- 
This is the menu-->
<
b>Menu</b><br /> 
<
a href="Index.htm">Index</a><br /> 
<
a href="Download.htm">Download</a><br /> 
<
a href="Register.htm">Register</a><br /> 
<
a href="Contact.htm">Contact</a>
</
div>
<
div class="content">
<!-- 
This is the content-->
Welcome to my first Conquer Online websiteI made this with CSS.<br />
Thanks to _Vodka for learning me basic css.
</
div>
<
div class="footer">
<!-- 
This is the footer-->
Copyright © _Vodka 2010
</div>

</
div>
</
body>
</
html
Now what did I exactly do?
Lets look on the css first.
I made background color black with
PHP Code:
body
{
    
background-colorBlack;

I made all headings stand as center with.
PHP Code:
h1
{
    
text-align:center;

I made the page to have auto margin.
And then the widht to be 800px.
Thats a good size and I like to work with it.
We have to take care of some still work with
small displays, but not many.
Not only what we got self, but what others got.
So 800px is a good thing to work with.
PHP Code:
.page
{
    
width:800px;
    
margin:auto;

Then I made sure out header is same size as our page.
So 800pixels again.
And I made a border with 1px and solid black style.
Then the color of the header gray.
PHP Code:
.header
{
    
width:800px;
    
border:1px solid black;
    
background-colorGray;

Then The menu with 10pixel padding, because thats a good padding.
Using it most time to get content and header alittle away from
the menu.
Then widht to be 150pixels, so is not too big or too small.
Then I made a border on it, because lets keep same style.
Different styled pages, looks bad (In most cases).
Then a Background color of gray.
And because I want it on left side, I used float to control, where
I wanted it.
PHP Code:
.menu
{
    
padding10px 10px 10px 10px;
    
width:150px;
    
margin:0px;
    
border:1px solid black;
    
background-colorGray;
    
float:left;

Now I made a padding on 10px again, to keep same style.
I made margin 0px, so it will be at the edge of the border.
And no spaces. Then I made a border with 1pixel and solid black
to keep same style as before.
Then background color white, because thats a standart color of
content page.
Because it should be right side of menu, then I used float
to control that it is.
PHP Code:
.content
{
    
padding:10px 10px 10px 10px;
    
width:600px;
    
margin:0px;
    
border:1px solid black;
    
background-colorwhite
    
float:right;

Now we need to make the footer act like a footer.
Well width is 800px, because it needs to be at the whole buttom of page.
Then marget -150, so it puts it at a good position.
U can try edit the options for what u think is best.
And rest options are to make it fit in the page.
With style etc.
PHP Code:
.footer 
{
    
positionrelative;
    
margin-top: -150px;
    
height30px;
    
clear:both;
    
background-colorGray;    
    
width:800px;

Thats how I build up the css page.
Hope you know what were doing now.
Now for the html page.
Lets look on every tag, dats important.
First thing is the header.
PHP Code:
<div class="header">
<!-- 
This is the header-->
<
h1>CO Website</h1>
</
div
Well is kinda self explanation.
<h1> is the heading tag.
It contains more then 1 control in 1.
There is from h1 - h7.
Higher number = smaller text.
Dont ask why, cuz I actually dont know.
Makes no sense for me.
Well </h1> is to end the tag.
But u know if u readed alittle about html.
Now lets look on next div wich is the menu.
PHP Code:
<div class="menu">
<!-- 
This is the menu-->
<
b>Menu</b><br /> 
<
a href="Index.htm">Index</a><br /> 
<
a href="Download.htm">Download</a><br /> 
<
a href="Register.htm">Register</a><br /> 
<
a href="Contact.htm">Contact</a>
</
div
I made a little text to show is the menu.
<b> tag stands for bold. Like here on forum is [ b ].
So the text Menu will be in bold.
Now to link to each page, I made these links.
<a> = link.
href is the reference of the link.
Where it should link to.
Example:
PHP Code:
<a href="http://google.com">Google</a
Dats a simple linking to google.
There is not needed much explanation for content.
Is the white bar you saw before in the page.
when you putting things in it, then it will automatical be bigger.
As were controlling that in the css file.
Look for .content class
PHP Code:
<div class="content">
<!-- 
This is the content-->
Welcome to my first Conquer Online websiteI made this with CSS.<br />
Thanks to _Vodka for learning me basic css.
</
div
Then we got the footer.
It dosnt need much explanation either as is just some plain text like copyright etc.
PHP Code:
<div class="footer">
<!-- 
This is the footer-->
Copyright © _Vodka 2010
</div
Hope this was useful, so you could start make ur own Conquer website.
Regards.

Download + Preview:



Goodluck with your server and goodluck with your site.
_Vodka is offline  
Thanks
3 Users
Old 10/02/2010, 06:24   #2
 
elite*gold: 0
Join Date: Sep 2010
Posts: 90
Received Thanks: 26
Very nice little tutorial. Also, it's nice to use containers to wrap around your divs. Why are you using classes instead of ID's?

-Edit-

Also, if you guy's want, you can add this in the CSS.

a:link { color: red; }
a:visited { color: red; }
a:hover { color: blue; }

It's a hover effect.
peterpiper99 is offline  
Old 10/02/2010, 13:34   #3
 
elite*gold: 0
Join Date: Sep 2008
Posts: 494
Received Thanks: 120
he told that classes can be used more than once instead of boxes well me i prefer to use ids i dont see differences rly and he spend some time for this guide the easiest way for newbies is to use program which can do much work for them while tthey will learning its my opinion, also they can make rounded divs with border-radius e.g. #blabla{bla bla; border-radius:10px;} Also they can use <li> with not rly needed <ul> for menu's, or <iframe> to save work creating subpages next thing might be simple css buttons instead of boring text
Quote:

for html:

<a href="home.html" target="main1">
<div id="button" onMouseOver="id='button1'" onMouseOut="id='button'">
Home
</div>
</a>

and this goes to css:

#button{
position:relative;
color:yellow;
font-size:30px;
font-family:Berlin Sans FB;
text-align: center;
min-width:150px;
height:50px;
float:left;

}
#button1{
position:relative;
color:black;
font-size:35px;
text-align:center;
font-family:Berlin Sans FB;
background-color: yellow;
min-width:150px;
height:50px;
float:left;
border-radius:20px;
}
this is an egzample from my simple site
Adziunia is offline  
Old 10/02/2010, 13:35   #4
 
elite*gold: 0
Join Date: Sep 2008
Posts: 494
Received Thanks: 120
he told that classes can be used more than once instead of boxes well me i prefer to use ids i dont see differences rly and he spend some time for this guide the easiest way for newbies is to use program which can do much work for them while tthey will learning its my opinion, also they can make rounded divs with border-radius e.g. #blabla{bla bla; border-radius:10px;} Also they can use <li> with not rly needed <ul> for menu's, or <iframe> to save work creating subpages next thing might be simple css buttons instead of boring text
Quote:
for html:
<a href="home.html" target="main1">
<div id="button" onMouseOver="id='button1'" onMouseOut="id='button'">
Home
</div>
</a>
and this goes to css:
#button{
position:relative;
color:yellow;
font-size:30px;
font-family:Berlin Sans FB;
text-align: center;
min-width:150px;
height:50px;
float:left;

}
#button1{
position:relative;
color:black;
font-size:35px;
text-align:center;
font-family:Berlin Sans FB;
background-color: yellow;
min-width:150px;
height:50px;
float:left;
border-radius:20px;
}
this is an egzample from my simple site
Adziunia is offline  
Old 10/02/2010, 15:41   #5
 
elite*gold: 0
Join Date: Oct 2010
Posts: 148
Received Thanks: 57
IDs are used for special tags, thats only used once.
where classes are used places, where is needed more then once.
I used classes, since i need it on all pages. Wich is more then once.
_Vodka is offline  
Thanks
1 User
Reply


Similar Threads Similar Threads
[HELP]hOW TO MAKE WEBSITE AND REGISTER PAGE!
08/10/2011 - EO PServer Hosting - 16 Replies
Hello evryone i want to ask you all how to setup and make website/register page for my server..can anyone give me the link and guides how to make register page or website full for my pserver... :handsdown:
[HELP]IF I WANT MAKE WEBSITE USING HAMACHI IP
06/28/2010 - EO PServer Hosting - 6 Replies
http://i821.photobucket.com/albums/zz135/bangelice o91/untitled.jpg what must i put there if i want make my website with hamachi ip..dom i need to put 127.0.0.1 also?can someone give me the details how the ip shold be put there:handsdown::handsdown::handsdown::handsdown:
[Release]Make a new website! Any ideas!?
06/15/2010 - CO2 PServer Guides & Releases - 15 Replies
Hello, I gonna make a conquer website, do you got any ideas ? The register page and Unstuck tool is for v5017 LOTF for other sources ask me! Progress: * Register page 50% * Unstuck tool 100% * Status Checker 100% * Top Rankings 20%
Website files how to make link ?
04/24/2010 - EO PServer Hosting - 5 Replies
On my Website idk how to make a download link so it goes directly to the megaupload. and also i would like to know how to make a link back to epvp if you know how can u tell me
how can i make my website online?
07/25/2009 - CO2 Private Server - 6 Replies
i want know how can i make my website online need a web host? if i need webhost i need agood web host But register page not online how can i make my register page online Sry i noob



All times are GMT +1. The time now is 03:09.


Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2026 elitepvpers All Rights Reserved.