Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Jimmieboy

macrumors 6502
Original poster
Oct 30, 2005
297
0
Australia
Hey everyone. I was ust wondering if there was an easy way to design a website that uses CSS. Obviously there is I'm just not sure how to go about it. What are the advantages anyway? I know HTML, PHP and some SQL. I use dreamweaver to help me out. Any advice would be appreciated!
 
Jimmieboy said:
Hey everyone. I was ust wondering if there was an easy way to design a website that uses CSS. Obviously there is I'm just not sure how to go about it. What are the advantages anyway? I know HTML, PHP and some SQL. I use dreamweaver to help me out. Any advice would be appreciated!
Basically, CSS is designed to strip as much "layout/design" out of HTML as possible, and leave the HTML to describe the content of the page. This way, a different stylesheet can be applied to the same content to adapt it to different browsers/users' preferences/display devices.

Beyond that, I'm not familiar with the latest CSS2/XHTML strict standards, since I don't do web development. There are many good tutorials online though. I'd start just googling for CSS2/XHTML tutorials and see what you come up with.
 
killmoms said:
Basically, CSS is designed to strip as much "layout/design" out of HTML as possible, and leave the HTML to describe the content of the page. This way, a different stylesheet can be applied to the same content to adapt it to different browsers/users' preferences/display devices.

Beyond that, I'm not familiar with the latest CSS2/XHTML strict standards, since I don't do web development. There are many good tutorials online though. I'd start just googling for CSS2/XHTML tutorials and see what you come up with.
So basically a way to reduce code?
 
Jimmieboy said:
So basically a way to reduce code?

Seperate design from code (as mentioned).

Reduce page size saving bandwidth, load time, and resource usage.

More accessible for users with disabilities.

And a ton of other reasons.


This is the best book you could ever get started with.
 
As an Amazon Associate, MacRumors earns a commission from qualifying purchases made through links in this post.
With CSS the site is easier to mantain or change. If you want to change the font/color/size of the text you only change 1 file (css) and all the site would update to the new look.

You can also avoid some javascript, by using CSS to create rollover nav.
 
There are also some nice tricks you can do with CSS which aren't possible with HTML only - non-repeating background images for example. Once you get a grip of CSS, you see the possiblities (which would be even more if only all browsers would support the latest W3 standards... ;) )
 
the thing is though that different browsers read css differently so you're gonna have to learn to write various 'hacks' for various browsers so your site looks the same everywhere. so you still do need to use the occasional table here and there, css hasn't come into its own yet, which really sucks :)
 
sk3pt1c said:
the thing is though that different browsers read css differently so you're gonna have to learn to write various 'hacks' for various browsers so your site looks the same everywhere. so you still do need to use the occasional table here and there, css hasn't come into its own yet, which really sucks :)

Actually there isn't a need for hacks, unless you're calling conditional comments a hack. If that's the case, then yeah.

Actually, the only use for tables is tabular data. And it's not from a visual aspect, it's from a standards for the visually imparied aspect. I could take an unordered list and make colums for a table-like look.

Unless it get's really, really, really crazy with graphics and tons of other visual presentation, no need for tables at all. Even in most of the demanding layouts, it can still be done without them.
 
ThunderLounge said:
Actually there isn't a need for hacks, unless you're calling conditional comments a hack. If that's the case, then yeah.

Actually, the only use for tables is tabular data. And it's not from a visual aspect, it's from a standards for the visually imparied aspect. I could take an unordered list and make colums for a table-like look.

Unless it get's really, really, really crazy with graphics and tons of other visual presentation, no need for tables at all. Even in most of the demanding layouts, it can still be done without them.
I agree 100%. There's no reason this day and age not to build complete CSS-based layouts. Pretty much anything can be done if you know what you are doing. That's one of the reasons I love about CSS-based design. It kind of renders WYSIWYG editors useless and starts to really separate the "web designers" from the "designers who can use dreamweaver". :D
 
I have recently started developing in CSS (about a year ago) and beyond the learning curve it's great. Layout is much easier and flexible using CSS and there are some cool effects you can do.

I still find myself thinking "stuff, CSS, i'll just make a table and it will be done" but do try my best to spend the extra time doing it through CSS. It sure pays off when you want to modify the site later!!

As a test I like to check how my sites display on a PDA and i'm pretty pleased with the results - without any extra attention to making them compatible!

Get into CSS and you'll be very happy with how flexible it is. Good luck!
 
andrewag said:
I still find myself thinking "stuff, CSS, i'll just make a table and it will be done" but do try my best to spend the extra time doing it through CSS. It sure pays off when you want to modify the site later!!

This will go away with time, pretty quickly if you code with a text editor and not with something like Dreamweaver. Tables are such a PITA - I have to use them for a web app at work as it's legitimate tabular data, and I guess I should just be thankful I get to stick the bulk of the table inside a loop at let the computer do most of the work.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.