X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   Why are they still using tables for layout? (https://forum.x-cart.com/showthread.php?t=54565)

Sisom 07-11-2010 04:42 PM

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>


balinor 07-11-2010 04:46 PM

Re: Why are they still using tables for layout?
 
Yea, they still don't get it

Sisom 07-11-2010 04:50 PM

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!

balinor 07-11-2010 05:00 PM

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!

ARW VISIONS 07-11-2010 05:05 PM

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.

balinor 07-11-2010 05:06 PM

Re: Why are they still using tables for layout?
 
Depends - the alternate stylesheets per browser usually take care of that.

ARW VISIONS 07-11-2010 05:10 PM

Re: Why are they still using tables for layout?
 
I don't use the <p> tag all that much.

ARW VISIONS 07-11-2010 05:32 PM

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.


cflsystems 07-11-2010 05:50 PM

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

Sisom 07-12-2010 01:14 AM

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.


All times are GMT -8. The time now is 12:41 PM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.