PDA

View Full Version : Whats the best way to code a layout?



:M2K
01-04-2007, 10:12 PM
I've seen people talking about not using much CSS around this forum, and CSS is the main way that I code layouts! I use divs and put the size and position etc of these divs in CSS in a style sheet for my layouts.

I used to slice my layouts in fireworks and use the automatically generated html file, but the loading time on that was slow which is why I switched to style sheets.

So what's the best way to code a layout?

Invent
01-04-2007, 10:13 PM
The best way is using Valid XHTML with DIV's. Obviously using CSS to style and position the DIV's.

Luckyrare
01-04-2007, 10:16 PM
Yuh most people use XHTML with divs - of course using CSS. I havent seen a coder not use CSS in a long time on this forum when coding their layouts

VPSwow
01-04-2007, 10:18 PM
i used your previous technique by slicing in fireworks then exporting it to dreamwever in HTML.

Mentor
01-04-2007, 10:35 PM
Css/Divs is by far the best imo :)

Heinous
02-04-2007, 12:07 AM
For browser compatibility (due to Internet Explorer 6 handling a lot of CSS incorrectly, or not as expected) tables, unfortunately.

To show skill, css + divs.

Sygon..
02-04-2007, 11:55 AM
The reason your not seeing many people code in CSS,XHTML etc. Is because about 75% of this webdesign forum is people who come to learn how to do stuff and expect they can do it with a few clicks.

On the other hand you got the 25% who have been there done it bought the t shirt and know basically everything they would probaly need to know in their career.

:M2K
02-04-2007, 03:26 PM
So is the method I use at the moment an efficient way? I put all the smaller div sections into one big div so that it doesn't look too different in different browsers if you know what I mean, and I use floats to position them. I don't actually know what XHTML is :eusa_eh:, anyone care to explain more?

Mentor
02-04-2007, 03:58 PM
So is the method I use at the moment an efficient way? I put all the smaller div sections into one big div so that it doesn't look too different in different browsers if you know what I mean, and I use floats to position them. I don't actually know what XHTML is :eusa_eh:, anyone care to explain more?
XHTML is pretty much exsactly the same as HTML, its just stricter, aka all tags have to be lower case, and all have to be closed, for exsample <br> isnt closed so youd use <br /> .
It doesnt really make a whole lot of difference in the long run. Html 5/xhtml 2 will be where some real differences start appearing.

Plus, although it occaonly takes a few browser hacks for IE, createing a css/div layout thats cross compatble is still possible to do.

:M2K
02-04-2007, 06:19 PM
Thanks, +rep need to spread. Coded my layout now http://matban.fredvaux.com/site :)

Want to hide these adverts? Register an account for free!