Post by Moviews » Mon Feb 09, 2009 4:56 pm

I looked at the source code for v1.1. Will be tableless? (Currently not.)

OpenCart is WordPress of the shopping carts.


New member

Posts

Joined
Tue Feb 03, 2009 6:22 pm

Post by Daniel » Mon Feb 09, 2009 7:00 pm

which parts are you complkaning about?

the layout is not a made from tables.


there is also nothing wrong with using tables they are all part of the html

OpenCart®
Project Owner & Developer.


User avatar
Administrator

Posts

Joined
Fri Nov 03, 2006 6:57 pm

Post by Moviews » Mon Feb 09, 2009 8:08 pm

That's right. There is no problem. Table is a html selector. Just I think this isn't "trend". For example in catalog\view\template\common\home.tpl see

OpenCart is WordPress of the shopping carts.


New member

Posts

Joined
Tue Feb 03, 2009 6:22 pm

Post by Daniel » Sun Feb 15, 2009 1:21 am

If firefox and IE supported full CSS2 I would be fine using divs but they don't.

What happens if you don't set a height is they start going out of wack and not dropping to the next line. If you set a height and someone enters a long tilte the information falls out of the bottom of the div box.

The list page is fine because its tubular data.

OpenCart®
Project Owner & Developer.


User avatar
Administrator

Posts

Joined
Fri Nov 03, 2006 6:57 pm

Post by nde » Tue Feb 17, 2009 9:03 am

I think the current way using a table for the product grid is perfectly ok. Some will argue that semantically it's a list and not tabular data.


However, there will be problems if a product title is a little bit too long (see illustration below). I know, chances for this to happen aren't very high, but you can easily fix it.


http://i40.tinypic.com/kdlsw6_th.png[/img]

http://i42.tinypic.com/qoamuf_th.png[/img]


If you give table-layout:fixed to the CSS of the table, it will stick to the width you specified via CSS (also works with tables that are set to width=100%).
If you add overflow:hidden, the long title won't flow out of the table

Code: Select all

.list {
table-layout:fixed;
}

.list td {
overflow:hidden
}
the result:
http://i41.tinypic.com/2a68qog_th.png[/img]

nde
New member

Posts

Joined
Sat Jun 30, 2007 7:32 am

Post by fido-x » Tue Feb 17, 2009 9:09 am

Daniel wrote: What happens if you don't set a height is they start going out of wack and not dropping to the next line. If you set a height and someone enters a long tilte the information falls out of the bottom of the div box.
A way around this is to add --

Code: Select all

<div style="clear: both;"></div>
before closing the main div.

Fido-X.

Image
Modules for OpenCart 2.3.0.2
Homepage Module [Free - since OpenCart 0.7.7]
Multistore Extensions
Store Manager Multi-Vendor/Multi-Store management tool

If you're not living on the edge ... you're taking up too much space!


User avatar
Expert Member

Posts

Joined
Sat Jun 28, 2008 1:09 am
Location - Tasmania, Australia
Who is online

Users browsing this forum: No registered users and 9 guests