| Home | Register | FAQ | Members List | Search | Today's Posts | Mark Forums Read |
|
|
#1 (permalink) |
|
Professional Idiot
Join Date: Aug 2006
Location: Uk
Posts: 59
|
CSS, how am i doing?
I'm sure you people have read it a thousand times, newbie switching from tables to css. But anyway, i started learning CSS a couple of days ago and want a bit of critique on the following code. Things i'd like to know: Basically is my code good so far? any bad points? am i heading in totally the wrong direction doing it like i am at the moment? Also a brief question, as you can see in the code below on line 19 i'm using <img tags to display multiple images in one div tag. Later i will be making each of these images a link. What i would like to know is, is there a better way to do this using css than how i'm currently doing it? Code:
The page looks like this in Firefox: http://img89.imageshack.us/img89/4504/spss6.jpg Thanks in advance for any help |
|
|
|
|
|
#2 (permalink) |
|
For all your goober needs
Join Date: Dec 2004
Location: Coventry, UK
Posts: 1,528
|
that's a damn good start chap!!! things i would change: 1) any fonts with a space in them need to be specified thus : "Trebuchet MS" 2) the menu can be done as an unordered list, then the images added via css 3) personally i would place all of the css for html and pace it in your body declarations. there'd no need for html {... } 4) when referencing backgronud urls, i always make them root relative. keep it up! |
|
|
|
#3 (permalink) | |
|
Senior Member
Join Date: Jan 2005
Posts: 12,358
|
You've misspelled "bottom"... Anyway. Quote:
Navigation should usually be a list. Check out http://css.maxdesign.com.au |
|
|
|
|
#4 (permalink) |
|
Everything is fine.
|
You may also want to place your CSS in an external file instead of directly in your page mark-up. This makes site wide maintenance a breeze as all your HTML pages will link to the one external css file; it also minimises the size of the HTML page too. - Mike |
|
|
|
#5 (permalink) |
|
blam blam
Join Date: Aug 2006
Location: ann arbor, mi usa
Posts: 527
|
too many closed div tags? Code:
also, for your own sanity, try making your code more readable/debuggable/maintanable/etc by using seperate lines and indentation. it can save loads of time later on, and it helps you keep track of nested tags and making sure you have the right ratio of open/closed tags. like so: Code:
|
|
|
|
#6 (permalink) | ||||
|
Professional Idiot
Join Date: Aug 2006
Location: Uk
Posts: 59
|
Quote:
Quote:
Quote:
Quote:
And i see where you coming from on the code formating, spacing it out more. I was just going a little crazy seeing how many lines i could get the code down to but i guess it's probably not the best way to do things |
||||
|
![]() |