hi all,
I am working on a page but its layout seems broken as page has a horizontal scroll and broken layout. i can’t seem to find the problem?
This site is a perfectly good example for why tables should NOT be used for layout - it creates a coding nightmare. You also have 223 validation errors - any one of them could be why things look broken.
Without dissecting all those table tags, which would take a loooong time: The page doesn’t actually look broken, but the header image is simply not wide enough to span the entire table width. The code also starts with a table of a width of 100, in which everything else, including the next table that is 980 wide, is placed.
You’re also missing half of your doctype.
its a CMS system template. i know tables are unnesscary of a headache. so rewritting the template in div is also a headache because i just need to fix the table. so its the header width?
It might sound like a pain, but honestly throwing it out and starting over would be faster than trying to fix that disaster of code… You’ve got an unbelievable 240k of markup there for a mere 26k of plaintext – if there’s ANY reason for that to be more than 64k of markup I’d be SHOCKED! It’s so needlessly convoluted a mess it’s a waste of time to even try to save ANY of it from a repair/maintenance standpoint.
The issues are further compounded by the changing of font-size without changing line-height resulting in overlapping lines on LF/120dpi systems, overlapping elements all over the page regardless of their size because nothing is set to auto-adjust to it’s content… the illegible color combinations, absurdly undersized fixed metric fonts on EVERYTHING, top to bottom the entire layout contains things that to be brutally frank I consider “Non web deployable”.
I’d be flabberghasted if it rendered “right” or even usable in any browser – as I’m not seeing it here. Again, it would be faster and easier to throw it out and start over from scratch than to even TRY to fix any of that.
I don’t know why in 2012 which it will be rulled by CSS3 some peoples struggles to use tables.
hahha, well don’t blame me, its a e-com CMS, i wonder if they r so lousy to code in tables
The answer is plain as day
<!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.01 Transitional//EN” “http://www.w3.org/TR/html4/loose.dtd”>
YES, they’re that lousy, they even advertise it – because the above doctype means they are in transition from 1997 to 1998. Welcome to thirteen year out of date coding methodologies… which is probably the last time the developers of said e-commerce software bothered updating their skills or their codebase… and why you do NOT see a lot of mainstream successful businesses using it. Lots of fly-by-nights though…
I never seen coding like that in ages. And it’s 7-9 level deep nested code. Lol. Btw it’s 3DCart