Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

[HTML & CSS] Trying to learn, here's what I have so far (Critique & Advice please?)

Master Summoner
Loyal Member
Joined
Nov 30, 2007
Messages
511
Reaction score
0
[HTML & CSS] Trying to learn, here's what I have so far (Critique & Advice please?)

Hey! I'm trying to seriously get into web design. I've tried in the past, but I've never really been able to figure out to morph a bunch of code into a serious website layout. I'm making a lot of progress, but I'm still really confused about a lot of what I'm doing.

Anyway, so far, I've managed to create something almost semi-decent (almost!). I'm posting it here in hopes of being able to get some critique & advice on coding practices and rules.

[CSS]
- styles.css

Code:
body {
	/*background-image: url('cloud_bg.png');*/
	background-color: #003366;
	text-align: center;
}

div#header{
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
 }

div#sun {
	position: absolute;
	left: 10%;
	right: 99%;
}

div#navigation {
	position: relative;
	background-color: #0066CC;
	width: 20%;
	top: 196px;
	bottom: 0;
	right: 890px;
	float: right;
	padding: 4px;
	height: 400px;

	border-width: thin;
	border-color: white;
	border-style: solid;
}

a {
	text-decoration: none;
	font-family: tahoma;
	font-size: 20px;
}


a:hover { 
	color: #33CCFF;
}

div#content{	
	position: absolute;
	top: 200px;
	right: 300px;
	bottom: 50px;
	width: 550px;
	background-color: #0066CC;
	height: 500px;
	border-width: thin;
	border-style: solid;
	border-color: white;
	font-family: Verdana, Georgia;
	text-align: Center;
	margin: 3px;
}

div#content > p {
	color: #000000;
}

hr {
	width: 85%;
	background-color: #000033;
	height: 2px;
	border: none;
}

HTML:
[/B] (The notes at the top are just ones that I took while reading a website)
 - index.html
[code]<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>

<!-- Notes
	1. Be sure to define the dimensions of any image you post. It prevents image loading mess-ups and the client appears to be loading 	the page faster.
	2. Use hspace (horizontal space) and vspace (vertical space) to add padding to an image. If text is near enough to the image, rather 	than going right up to its border, it will stay the specified amount of pixels away from it.
	3. Usage of the "alt" attribute is mandatory for images according to the latest HTML standard.
	4. When making thumbnails, you can attract interest in the image by cropping & resizing rather than simply resizing.
	5. Avoid <embed>.
	6. valign - top, middle, bottom
	7. Tables can be made more accessible by using the <summary> & <caption> tags.
	8. CSS Syntax: selector {property: value; property: value; property: value; }
	9.  Cascade Order:
	    *  the style attribute overrides
	    * a style block, which overrides
	    * a linked stylesheet, which overrides
	    * an imported sheet.


	Attributes:
		Images:
			target - For images; Control how the browser will react when an image linked to a URL is clicked.
			Possible values: _blank - Opens a new window with the image.

		Tables:
			<table> - Holds table-related data. VALUES: border, align, width
			<tr> - Starts a new table row.
			<td> - Table data (A.K.A. Cells)
			<th> - Use between <tr> tags to create table headers.
			<colspan> - Spans across <value> cells.
			<rowspan> - Same thing as above, just with rows.
	-->

<head>
	<title>Test Website</title>
	<link rel="stylesheet" type="text/css" href="styles.css">

	<div id="header">
	<img src="header.png" alt="Emilio's ???">
	</div>
</head>

<body>
	<!-- Formatting Testing Starts Here -->
	<div id="navigation">
		<h2 style="font-size: 150%;font-family: Tahoma;color:#000033;">Navigation<h2>
		<a href="index.html">Home</a>	<br><br><br><br><br><br><br><br><br>
		<p>
		<a href="http://jigsaw.w3.org/css-validator/check/referer">
    		<img style="border:0;width:88px;height:31px"
        	src="http://jigsaw.w3.org/css-validator/images/vcss-blue"
       		alt="Valid CSS!" />
		</a>
		</p>
      
	</div>
	<!-- Navigation End -->

	<!-- Content Start -->
	<div id="content">
	<p><h2>Title</h2></p>
	<hr noshade>
	<p>Content! Content! Content! Content! Content! </p>
	</div>
	<!-- Content End -->
</body>
</html>[/code]

Header:
<Attached>
 

Attachments

You must be registered for see attachments list
Joined
Dec 1, 2007
Messages
2,795
Reaction score
480
Re: [HTML & CSS] Trying to learn, here's what I have so far (Critique & Advice please

This post below is from what I understand about HTML/CSS, if I say something that is untrue please correct me :p:

That should be in the body and also you haven't closed the img tag, do /> instead of just >
Code:
<div id="header">
	<img src="header.png" alt="Emilio's ???">
	</div>

One thing that I've learnt with CSS is it's good to use resets, so you can just add at the top of the stylesheet
Code:
html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, font, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td {
	margin: 0;
	padding: 0;
	border: 0;
	outline: 0;
	font-weight: inherit;
	font-style: inherit;
	font-size: 100%;
	font-family: inherit;
	vertical-align: baseline;
}
Or you could use
Code:
* {    margin: 0;
	padding: 0;
	border: 0;
	outline: 0;
	font-weight: inherit;
	font-style: inherit;
	font-size: 100%;
	font-family: inherit;
	vertical-align: baseline;
}

You also don't need to define the width if it's 100%, it'll automatically go to 100%.

With stuff like
Code:
border-width: thin;
	border-color: white;
	border-style: solid;
I personally think it's better to do
Code:
border:1px solid white;
 
Divine Celestial
Loyal Member
Joined
Sep 13, 2008
Messages
853
Reaction score
14
Re: [HTML & CSS] Trying to learn, here's what I have so far (Critique & Advice please

Hey! I'm trying to seriously get into web design.

If you really go into it, let me sugest some really usefull tools(at least they are for me):
Mozilla Firefox add-ons:
Web Developer:
With it you can validade CSS, HTML(even if running at localhost), clear cookies, disable javascript, view page info like color's used, page size, and lots of other usefull things

MeasureIt:
With it you can check the size of things on the page very easy, you can check the size of a button or anything.

Colorzilla:
With that you can get color of things on the site, be it from a css or image, you can change red/green/blue of the color(double left click colorzilla icon at bottom left) to find a good color, without using paint or anything.
You can also get the "#rgb" or "rgb(r, g, b)" of the color by right clicking the icon.

Firebug:
With that you can view page source code and live change it, you can check what CSS classes get for each tag, disable some property or add/change another and some other things.

Website:

At that site you can get ScreenShots of your layout in different OS and browsers, before you start, be sure to have your site at a good hoster because they have a timout and if the site doesnt load in time, it will take the SS of a not fully loaded site, being useless for you

I wont explain how to use each tool, because it would be a lot big, but I added a little explanation of them.
I know you didnt ask for them but they will be really hand for you :p
Those things are inside quote just to separate better, I created the texts(didnt take them from the developers website), so it is not that complete.
Good luck on everything :)
 
Skilled Illusionist
Joined
Apr 22, 2009
Messages
301
Reaction score
19
Re: [HTML & CSS] Trying to learn, here's what I have so far (Critique & Advice please

When I do my CSS sheets i do organize it like that :
PHP:
#mystuff
{
    //Position related stuff (like padding, etc..)
    //Then graphics related stuff (like background, etc..)
}

That's just a trick :)
 
Canadian
Loyal Member
Joined
Dec 4, 2007
Messages
1,936
Reaction score
96
Re: [HTML & CSS] Trying to learn, here's what I have so far (Critique & Advice please

If you really go into it, let me sugest some really usefull tools(at least they are for me):
Mozilla Firefox add-ons:


Website:


I wont explain how to use each tool, because it would be a lot big, but I added a little explanation of them.
I know you didnt ask for them but they will be really hand for you :p
Those things are inside quote just to separate better, I created the texts(didnt take them from the developers website), so it is not that complete.
Good luck on everything :)

You just saved me hours of work. Thank you so much. :)
 
Custom Title Activated
Loyal Member
Joined
Feb 27, 2004
Messages
1,378
Reaction score
50
Re: [HTML & CSS] Trying to learn, here's what I have so far (Critique & Advice please

i don't know if u notice... but u put a div inside the head tag.
 
Joined
Jun 8, 2007
Messages
1,985
Reaction score
490
Re: [HTML & CSS] Trying to learn, here's what I have so far (Critique & Advice please

Research SEO to optimize your site's traffic through search engines.

Beginner's Guide:


Developer's Cheat Sheet:


You don't really need to know HTML & CSS that much to make a web-site, most people starting out these days get a good CMS and learn basic HTML+CSS. It's hard for most people to make a template and do EVERYTHING in the beginning. If you get to a spot where you're tired of learning or typing code, get a CMS and do some good SEO on it for a brilliant outcome. It all goes together becoming common sense after a while.

Good luck :thumbup1:
 
Skilled Illusionist
Joined
Apr 22, 2009
Messages
301
Reaction score
19
Re: [HTML & CSS] Trying to learn, here's what I have so far (Critique & Advice please

Also, Google Chrome "Inspect Element" is really a good tool!
 
Initiate Mage
Joined
Sep 9, 2007
Messages
1
Reaction score
0
Re: [HTML & CSS] Trying to learn, here's what I have so far (Critique & Advice please

you're starting off as I was. I started off doing Div ID tags, and now i dont really like them because they are not compatiable with IE. well atleast for me
 
Back
Top