close ad
Install the LAtest Updates to Work with CC 2017 and CC 2018
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

What is best CSS Code to use to make PowerCMS' Tables responsive??

Thread began 1/27/2016 3:30 am by cldsk | Last modified 2/01/2016 2:24 pm by Ray Borduin | 416 views | 5 replies |

cldsk

What is best CSS Code to use to make PowerCMS' Tables responsive??

Since PowerCMS has the insert table functionality, I have a lot of clients who use that to try and create their content placement - despite my objections and suggestions to it.

One main issue, is that it throws off the responsiveness of the site.

I am wondering what might be the best CSS code to use to allow the tables inserted via PowerCMS to be responsive? I have tried a couple things. Latest being:

@media screen and (max-width: 600px) {

table {
border: 0;
}

table thead {
display: none;
}

table tr {
margin-bottom: 10px;
display: block;
border-bottom: 2px solid #ddd;
}

table td {
display: block;
text-align: right;
font-size: 13px;
border-bottom: 1px dotted #ccc;
}

table td:last-child {
border-bottom: 0;
}

table td:before {
content: attr(data-label);
float: left;
text-transform: uppercase;
font-weight: bold;
}
}



But nothing seems to do the trick...any suggestions??

Sign in to reply to this post

Ray BorduinWebAssist

Can I get a sample url with a table on it that was added by powerCMS? I'll play around with it there to see if I can figure out a good CSS trick.

Sign in to reply to this post

cldsk

Thanks so much - see the private message for details.

Sign in to reply to this post

Ray BorduinWebAssist

The real issue isn't the tables... it is the images inside the tables... and there is no real good solution I can think of since you don't know how many columns they might add.

I think to handle the tables you just add to your css:

table {
max-width: 100%;
}



But then you are going to have to add a media query and break point to really change the table at some size. Something like:

@media only screen and (max-width: 960px) {

table td {
display: block;
text-align: center;
}
table td img{
max-width: 100% !important;
height: auto !important;
}

}



Those two combined should do the trick pretty well.

Sign in to reply to this post

cldsk

Thanks so much! I will give those a try

Sign in to reply to this post

cldsk

that did seem to work :) Thanks so much!

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...