Page 1 of 1

shocked at how much inline styles and tables in the markup!

Posted: Wed Jun 02, 2010 9:08 pm
by niceandripe
i'm really surprised that for such a clean and easy to use shopping cart application there are so many inlines styles and tables for layout.

there's certainly no need for any tables, ok maybe one for the cart, and as for inlines styles? well... ;)

does anyone else feel the same?

i'm a web standards designer and i'm passionate about this! (and i'm sure others are) ;D

i'd be happy overtime to create a standards compliant template to be used as the default that ships with latest version, but i may need some help with some of the markup that's written out using code... anyone up for helping out?

Re: shocked at how much inline styles and tables in the mark

Posted: Wed Jun 02, 2010 10:00 pm
by Qphoria
At some point someone stripped all the inline styles out and put them into css. Unfortunately we never managed to get those changes into the core before the next release so they were lost. After 1.4.8 comes out (very soon i promise) then if anyone would be so kind as to strip all the inline styles out and put them into the css, we would be happy to add it to the core.

Sometimes we get lazy and want a quick change so we add them inline and never get around to moving them to css

Re: shocked at how much inline styles and tables in the mark

Posted: Sun Jun 06, 2010 9:03 pm
by Dabnis
As the majority of on-line stores basically produce tabulate data (products) w3c suggests that such data is ideally suited to displaying within html 'table' elements . It is therefore not surprising to see table structures throughout opencart pages.
I do agree however that where the content of a page is not 'tabulated data' then compliant html (div / css) layout should be used.
Having worked on both SilverStripe & CMSMS content managmet systems, I find that 'coders' & 'designers' often have differing priorities. Can I suggest that coders make any html output fro their modules 'configurable', therby allowing designers to customize the output to their needs.

My first post, so Hi to all here.
Jonathan

Re: shocked at how much inline styles and tables in the mark

Posted: Sun Jun 06, 2010 9:19 pm
by OSWorX
Do not know who it was (there was a thread about it somewhere here), but attached the css only default template (based on OC 1.4.0)

Re: shocked at how much inline styles and tables in the mark

Posted: Sun Jun 06, 2010 9:49 pm
by niceandripe
tabular data is a table full of data - like a spreadsheet - i certinaly wouldn't call the category & product pages tabular data - I agree the cart would pass as tabular data, but the other pages are simple pages containing a set of repeating records.

tables in this case are unnecessary and limit styling potential - against Web Standards & WAI WCAG guidelines.

Thanks OSWorX, but i've pretty much stripped the latest version back to a raw layout, pulled the inlines styles back to CSS files - now toying with stripping the tables.. but that's a much bigger job :-\

Re: shocked at how much inline styles and tables in the mark

Posted: Sun Jun 06, 2010 9:55 pm
by OSWorX
niceandripe wrote:tables in this case are unnecessary and limit styling potential - against Web Standards & WAI WCAG guidelines.
This was the reason one of the users here made the css.based template.
A modern template (design) should be NOT based on tables.

Re: shocked at how much inline styles and tables in the mark

Posted: Sun Jun 06, 2010 10:48 pm
by Xsecrets
I still don't understand why some people hate tables so much. For list data there is nothing wrong with them. Why is div float div float clear div float div float clear any better than a table? I do understand many of the crazy table hacks for layout and that they are bad design, and you shouldn't use tables for layout with things like your whole site is one big table with three columns, but I do not for the life of me get the whole attitude that tables are evil things and should absolutely never be used.

Re: shocked at how much inline styles and tables in the mark

Posted: Mon Jun 07, 2010 5:08 am
by OSWorX
Xsecrets wrote:.. tables are evil things and should absolutely never be used.
Not really true - not that much to say against.
But stupid coding if (only/almost) inline styles are used - what for were extern css files invented?

Re: shocked at how much inline styles and tables in the mark

Posted: Mon Jun 07, 2010 11:31 am
by Qphoria
I used to be on the whole "Death to Tables" campaign too... and I know very little about designing, and was using Zen-Cart at the time.. so I made very little progress.

While some complain that tables are unnecessary, you are looking through blurry lenses.

Tables in this day and age should "not" be used for main page structures. But most of the tables used in OpenCart are strictly used for displaying tabular data "inside" a div block which is a perfectly valid way to use them. Because they are inside blocks, the blocks can be relocated easily with css and w3c standards. They can be floated, positioned, hidden, etc.

Zen-Cart uses a table for their main structure... this is fine if its 1999..and a lot people have scrutinized them for it. But their default template is so damn hideous nobody even cares what it uses.

OpenCart's main structure is 3 the column (aka Holy Grail) system which is a popular & sought after design

Re: shocked at how much inline styles and tables in the mark

Posted: Mon Jun 07, 2010 11:59 am
by Xsecrets
OSWorX wrote:
Xsecrets wrote:.. tables are evil things and should absolutely never be used.
Not really true - not that much to say against.
But stupid coding if (only/almost) inline styles are used - what for were extern css files invented?
yes you'll notice I didn't say anything about the inline styles. I totally agree death to all the inline styles in opencart. I cursed more than a few times when I was theming my store about the inline styles where I had to edit every single page to change the same box background borders etc.

Re: shocked at how much inline styles and tables in the mark

Posted: Tue Jun 08, 2010 2:25 am
by i2Paq
Why not start a community effort to create 1 all css templates to go from 1.4.8 on.