Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls

Why are they still using tables for layout?

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 07-11-2010, 04:42 PM
 
Sisom Sisom is offline
 

eXpert
  
Join Date: Sep 2006
Posts: 310
 

Default Why are they still using tables for layout?

I've just been fiddling with the X-Cart installation that I'm customising for a client, and I decided to try displaying the Featured Products in two column mode. Suddenly, all the changes I had implemented on the one column version were lost, and then I looked in Firebug and my heart sank: tables.

Not only tables, but the craziest implementation I have ever seen.

Code:
<tr class="first product-name-row"> <td class="first product-cell"> <div class="image"> <a href="product.php?productid=17515&cat=0&page=0&featured=Y"><img src="http://www.mrdtrading.co.uk/store/images/T/kart2small.jpg" width="125" height="79" alt="Red Rooster Go Kart" /></a> </div> </td> <td class="highlight last product-cell"> <div class="image"> <a href="product.php?productid=17518&cat=0&page=0&featured=Y"><img src="http://www.mrdtrading.co.uk/store/images/T/xctD748.tmp.png" width="125" height="125" alt="Rugged Racer Mini 101" /></a> </div>

So the table spans both columns, and then you have two <td> elements, one for the first product, one for the second. And repeat, all the way down the product description...

I may not have time to completely implement it with this client, but with my next job, I think I am going to completely redo this mess, and make it use CSS properly, i.e. no tables for layout. Perhaps I can get Qualiteam to hire me as their chief CSS designer! (Or rather, ONLY CSS designer, as they don't seem to understand how it works...)


I also keep seeing

Code:
<br /> <br />

and content which is only surrounded by div tags, no paragraph tags, hence their unnecessary use of the <br /> tags. How can you use CSS when you have something like:

Code:
<div class="whatdoescssmean"> A load of text that isn't in a paragraph. <br /> How do you change the bottom margin on the line above? Can't do it. </div>
__________________
X-Cart Gold Version 4.3.2
Reply With Quote
  #2  
Old 07-11-2010, 04:46 PM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default Re: Why are they still using tables for layout?

Yea, they still don't get it
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #3  
Old 07-11-2010, 04:50 PM
 
Sisom Sisom is offline
 

eXpert
  
Join Date: Sep 2006
Posts: 310
 

Default Re: Why are they still using tables for layout?

Hi Balinor, it's driving me nuts! It's like having to recode the thing from the ground up every time I start looking at a new template!

Is there a proper CSS template out there, with redesigned X-Cart templates? It would save a lot of people a lot of time if there were.

I can't understand how Qualiteam can't have one person who understands CSS properly, and it's not even complicated stuff that they're getting wrong, it's the basics, like the float property - they don't even know what it is!
__________________
X-Cart Gold Version 4.3.2
Reply With Quote
  #4  
Old 07-11-2010, 05:00 PM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default Re: Why are they still using tables for layout?

I know...I rewrite the whole template system from scratch each time a new version comes out. I had a 'proper' table-less layout in 4.1.x and I basically reuse that one each time. The way they use float and CSS drives me absolutely insane. All they need is one CSS pro over there to do it right!
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #5  
Old 07-11-2010, 05:05 PM
  ARW VISIONS's Avatar 
ARW VISIONS ARW VISIONS is offline
 

X-Man
  
Join Date: Jan 2007
Location: Pensacola, FL
Posts: 2,536
 

Default Re: Why are they still using tables for layout?

do you normalize the margins and padding of your <p> tags, hate the different default settings per browser.
__________________
xcart 5.1.2
Reply With Quote
  #6  
Old 07-11-2010, 05:06 PM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default Re: Why are they still using tables for layout?

Depends - the alternate stylesheets per browser usually take care of that.
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #7  
Old 07-11-2010, 05:10 PM
  ARW VISIONS's Avatar 
ARW VISIONS ARW VISIONS is offline
 

X-Man
  
Join Date: Jan 2007
Location: Pensacola, FL
Posts: 2,536
 

Default Re: Why are they still using tables for layout?

I don't use the <p> tag all that much.
__________________
xcart 5.1.2
Reply With Quote
  #8  
Old 07-11-2010, 05:32 PM
  ARW VISIONS's Avatar 
ARW VISIONS ARW VISIONS is offline
 

X-Man
  
Join Date: Jan 2007
Location: Pensacola, FL
Posts: 2,536
 

Default Re: Why are they still using tables for layout?

I have thought long and hard about re-writing the whole thing, but with some many versions being released it seems like a waste of time. maybe v5 will stick around for a while.

Quote:
Originally Posted by Sisom

Is there a proper CSS template out there, with redesigned X-Cart templates? It would save a lot of people a lot of time if there were.
__________________
xcart 5.1.2
Reply With Quote
  #9  
Old 07-11-2010, 05:50 PM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 14,190
 

Default Re: Why are they still using tables for layout?

Tables are ok if they are used to display tabular info but you are right - the whole html/css in xcart is a huge mess. And that is also contributing to the huge main css file
__________________
Steve Stoyanov
CFLSystems.com
Web Development
Reply With Quote
  #10  
Old 07-12-2010, 01:14 AM
 
Sisom Sisom is offline
 

eXpert
  
Join Date: Sep 2006
Posts: 310
 

Default Re: Why are they still using tables for layout?

Quote:
Originally Posted by Ashley
I don't use the <p> tag all that much.

I use the <p> tag all the time, to represent anything that looks like a paragraph, or anything that I want to hook CSS onto. There are so many instances in the templates where there aren't any <p> tags at all, just a container div and the text inside it.

Perhaps one of us can approach Qualiteam and see if they'll hire us for a few months' work, to fix it all!

Anyway, I'm going to have to redo the two column layout, as it is it's simply impossible to apply CSS to it - how can I put a background around one product box, when there are two side by side in the same table, they way they've done it?

I know it wasn't like that in 4.1, I have another site that uses that and I had no problems with two or even three column layouts. I'll have a look at that code and try to use it in 4.3.2, when I've done it all, I'll post it up in Completed Mods.
__________________
X-Cart Gold Version 4.3.2
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 10:25 PM.

   

 
X-Cart forums © 2001-2020