This is a discussion on "HTML layout - Help with good and bad practices" within the Web Page Design section. This forum, and the thread "HTML layout - Help with good and bad practices are both part of the Design Your Website category.
|
|
|
|
|
![]() |
||
HTML layout - Help with good and bad practices
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
#1
|
|||
|
|||
|
HTML layout - Help with good and bad practices
Hi there,
Just got a quick question regarding good methods and bad regarding layouts. Im a tables and CSS man myself, but I'm wondering how bad my practices are, ie are they suitable or not. For me, its what ever gets the job done, but im concerned I might be setting myself up for bad habbits, being self taught and all. The way I normally develop an HTML page / template is using tables. I usually start with a single table with a single row and no colums and set that to 100% width to get my area. All are border 0 and usually cellpad and cellspace set to between 2 and 5 depending on the design. Also depending on the design, I usually add another table inside that probably one row and two colums, and if I need to I can add a table inside one of those colums, when I have my layout and functions in place, I normally concentrate on my colors and grafix but sometimes mock some up before hand or as needed as visual place holders / notes. Im concerned that all these tables inside tables is a bad habbit, especially when a lot of html sites / templates now days are done using css and the div tag. I dont have a clue about working with DIV and css only. So, am I full of bad habbits or is my way acceptable? Cheers
Last Blog Entry: Fire In The Hole! (Jan 23rd, 2008)
|
|
|
|
#2
|
|||
|
|||
|
Re: HTML layout - Help with good and bad practices
I think that using tables is kind of a selfish thing to do, as it is bad for screen readers and its just plain wrong aswell!
Usings DIVs (<div>'s) and CSS is the correct way to build a site. Take the time to learn (X)HTML and CSS. Its worth it! |
|
#3
|
|||
|
|||
|
Re: HTML layout - Help with good and bad practices
Full of bad habits, I'm afraid
It's not easy to become proficient in using CSS for layouts. Once you've invested the time for learning, however, you will surely prefer CSS layouts to table layouts. Table layouts were a brilliant hack for the 90's, but their time has passed. Be warned, though: complex layouts in CSS are not easy, and sometimes impossible. Then again, why would you want a complex layout? If only Internet Explorer supported display: table-cell Last edited by MikeHopley; Jul 10th, 2007 at 12:50. |
|
#4
|
|||
|
|||
|
Re: HTML layout - Help with good and bad practices
I have an idea that <div> layouts are controled in majority by margin and padding etc, is this correct?
I always knew tables were "cheating" because of their ease of use, but I deffinately prefer the control you get with CSS. I will certainly look into xhtml further. I want to start moving towards compliance with the latest ways of doing things. I can see why things progressed to css & divs beacuse it gives you total site wide control from one or two little css files.
Last Blog Entry: Fire In The Hole! (Jan 23rd, 2008)
|
|
#5
|
|||
|
|||
|
Re: HTML layout - Help with good and bad practices
Quote:
Other useful properties include: width, max-width, float, and position. Some of these are pretty complex, but they allow you powerful control of your page layout if used properly. |
|
#6
|
|||
|
|||
|
Re: HTML layout - Help with good and bad practices
I have an article coming out in the August Newsletter that lays out the benefits to hand coding versus the way you are doing things.
But you'll have to wait!!! |
|
#7
|
|||
|
|||
|
Re: HTML layout - Help with good and bad practices
Sounds just like what I need... cant wait!!!
I can feel some one or two page experiments coming on lol The tables are strong but I must resist... heheheh I knew I loved css for a reason when I found it. I quite often forget all the css and html commands so I got a nice bookmark folder full of sites with refereces to what does what. If I ever need something a little more complex like text appear on mouse over image, I usually use google which has proved quite usefull. It's like a library or the world in one little box lol
Last Blog Entry: Fire In The Hole! (Jan 23rd, 2008)
|
|
#8
|
|||
|
|||
|
Re: HTML layout - Help with good and bad practices
See the stickied post or the link in my sig. Mucho goodies in that thread
|
|
#9
|
|||
|
|||
|
Re: HTML layout - Help with good and bad practices
One word....
WOW Thanks for those resources, they look like just the thing I need to get started Thanks again!!!
Last Blog Entry: Fire In The Hole! (Jan 23rd, 2008)
|
|
#10
|
|||
|
|||
|
Re: HTML layout - Help with good and bad practices
weasel, I was a table addict too! I'd come back here and say "Are you sure about the benefits to hand coding"! I even asked the question once in my frustration.. how come ebay uses tables and I can't!
I was so slow... so unprofitable.. but honestly within no time at all, I was understanding it and I was HOOKED! Everyday I learn something new and still love it. |
|
#11
|
|||
|
|||
|
Re: HTML layout - Help with good and bad practices
I remember that addiction of yours
|
|
#12
|
|||
|
|||
|
Re: HTML layout - Help with good and bad practices
Yup... Karinne gave me my first lbig push away from Tables.
:blush-anim-cl: |
|
#13
|
|||
|
|||
|
Re: HTML layout - Help with good and bad practices
Not just tables but nested tables! I nearly had a heart attack but luckily you are on the road to web standards heaven (though it can be a bit tricky sometimes). As Mike said some stuff can be quite complex but I would say that most things are doable and I would imagine anything you are doing now is possible with css, at a guess.
Those links that karinne has put up are amongst the best resources on the net (which is why she put them up, I imagine) and you won't go far wrong with them. Pete. |
|
#14
|
|||
|
|||
|
Re: HTML layout - Help with good and bad practices
Cheers guys for all the great responses and encouragement.
EDIT// nested tables? One inside another? I am following one or two of the recomended tutorials now which I hope will help me better understand how to align and marginalise using css. I am trying to get a simple header followed by a left colum and a right larger colum for content finsihed off with a footer, but I seem to be getting into a bit of a pickle with my left nav forcing my right side content down with it lol I refuse to give up cos I know once it clicks in my head and I figure it out I will feel like a right plum if it beats me lol
Last Blog Entry: Fire In The Hole! (Jan 23rd, 2008)
Last edited by weasel; Jul 10th, 2007 at 16:58. |
|
#15
|
|||
|
|||
|
Re: HTML layout - Help with good and bad practices
Tables are good for eating on. Man oh man am I fancy! woooo! At any rate CSS/XHTML Strict imo is the best way to go. In time you will find yourself getting the same results with far less code and then you can change your whole layout etc just by editing a single style sheet! It pretty much rocks.
Last Blog Entry: Apps every Mac based web dev should consider (Jul 10th, 2008)
|
|
#16
|
|||
|
|||
|
Re: HTML layout - Help with good and bad practices
Quote:
|
|
#17
|
|||
|
|||
|
Re: HTML layout - Help with good and bad practices
how would I have a div side by side? ie, like I would if I split a table row into two colums?
Last Blog Entry: Fire In The Hole! (Jan 23rd, 2008)
|
|
#18
|
|||
|
|||
|
Re: HTML layout - Help with good and bad practices
setting a width to each div and setting them to float: left (or right).
The examples in the thread I sent you too, should have this. |