Breaking lines in tables displayed on smaller displays

Rate this topic: Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.1.00 out of 6 based on 1 vote(s)
GK User
Mon Sep 29, 2014 8:12 am
Reply with quote
Report this post
Hello,

Im using inStyle template for restaurant menu webpage. It is fine and responsive but i have problem with tables. When i decrease browser window or try to display that page on any smartphone, lines in table break. I dont know how to make those tables responsive with no wrap content. Here is example page with my table:

http://domowatorun.pl/index.php/2014-07 ... 2/czwartek

Is there any style or something to fix it?

Best regards
Przemek
User avatar
Senior Boarder

teitbite
Mon Sep 29, 2014 9:06 am
Reply with quote
Report this post
Please add this code to override.css and make sure override is enabled in template settings.

Code: Select all
#itemBody > span[itemprop="articleBody"]{
    display: block;
    overflow: scroll;
    position: relative;
    width: 100%;
}
User avatar
Moderator

GK User
Mon Sep 29, 2014 9:17 am
Reply with quote
Report this post
Thank you for answer but this didnt help. There are still wraping lines in tables. Most important is last column with prices - it should be without breaks.

This is my page after flushing cache:
http://domowatorun.pl/index.php/2014-07 ... 2/czwartek

Regards
Przemek
User avatar
Senior Boarder

teitbite
Mon Sep 29, 2014 5:40 pm
Reply with quote
Report this post
Hi

I do not see my code in css. Are You sure it was added properly ? Please send me an access to joomla panel so I'll try myself.
User avatar
Moderator

teitbite
Tue Sep 30, 2014 12:13 pm
Reply with quote
Report this post
Hi

Sorry. It was a typo with "#" instead of "."

Now it works fine.
User avatar
Moderator

GK User
Tue Sep 30, 2014 12:47 pm
Reply with quote
Report this post
I think there is still the same problem... (I flushed cache locally and i flushed cache on siteground). When i change browser window or i watch this page on smartphone, there are still wraped text in tables. And after adding your script, there are scrollbars, which dont look very good.
User avatar
Senior Boarder

teitbite
Wed Oct 01, 2014 9:49 am
Reply with quote
Report this post
Hi

This scrollbars are exactly the solution for tables. It's a responsive function of bootstrap.

If You do not like it I would advice to disable bootstrap and than use this code to reduce paddings and font size, to squeeze it somehow:

Code: Select all
#gkMainbody table tbody,
#gkMainbody table thead,
#gkMainbody table tfoot {
    display: block;
    width: 100% !important;
}

#gkMainbody table tbody td,
#gkMainbody table thead td,
#gkMainbody table tfoot td {
    padding: 5px 0;
}

#gkMainbody table tbody td h4,
#gkMainbody table thead td h4,
#gkMainbody table tfoot td h4,
#gkMainbody table tbody td h5,
#gkMainbody table thead td h5,
#gkMainbody table tfoot td h5 {
    font-size: 12px;
}

#gkMainbody table tbody td img,
#gkMainbody table thead td img,
#gkMainbody table tfoot td img {
    width: 50px;
}


all above should go to mobile.css
User avatar
Moderator


cron