Skip Navigation

[Closed] View responsive

This support ticket is created 3 years, 10 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

Tagged: 

This topic contains 5 replies, has 2 voices.

Last updated by Shane 3 years, 10 months ago.

Assisted by: Shane.

Author
Posts
#1909043

Hello! I have a view that has to be consulted on the mobile. I have this code inserted but if I apply it it also applies to the desktop view.

@media
only screen and (max-width: 760px),
(min-device-width: 768px) and (max-device-width: 1024px) {

/* Force table to not be like tables anymore */
table, thead, tbody, th, td, tr {
display: block;
}

/* Hide table headers (but not display: none;, for accessibility) */
thead tr {
position: absolute;
top: -9999px;
left: -9999px;
}

tr { border: 1px solid #ccc; }

td {
/* Behave like a "row" */
border: none;
border-bottom: 1px solid #eee;
position: relative;
padding-left: 50%;
}

td:before {
/* Now like a table header */
position: absolute;
/* Top/left values mimic padding */
top: 6px;
left: 6px;
width: 45%;
padding-right: 10px;
white-space: nowrap;
}

/*
Label the data
*/
td:nth-of-type(1):before { content: "NOMBRE CAMPAÑA"; }
td:nth-of-type(2):before { content: "NOMBRE BONO"; }
td:nth-of-type(3):before { content: "FECHA CREACIÓN"; }
td:nth-of-type(4):before { content: "DATOS USUARIO"; }
td:nth-of-type(5):before { content: "VALIDACIÓN"; }
td:nth-of-type(6):before { content: "ESTADO"; }

}

/* Smartphones (portrait and landscape) ----------- */
@media only screen
and (min-device-width : 320px)
and (max-device-width : 480px) {
body {
padding: 0;
margin: 0;
width: 320px; }
}

/* iPads (portrait and landscape) ----------- */
@media only screen and (min-device-width: 768px) and (max-device-width: 1024px) {
body {
width: 495px;
}
}
#1909489

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Avansis,

Thank you for getting in touch.

Can you provide a little more clarity on the issue ?

Is it that you are using a table and want this table to be responsive on mobiles?

Please let me know.

Thanks,
Shane

#1909517

I have this code in css in my view.
But doesn't work fine.

You can see this in:
- /prueba/

In mobile css doesnt work

#1909783

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Avansis,

I'm unsure of what this css is suppose to do.

Is there a link to where the css originated from where I can have a quick look ? The css is being loaded on the page itself but unsure why its not being applied.

Thanks,
Shane

#1909875

Hi Shane.

CSS is in view Listado bonos administrador prueba.

I need the table to be put on mobile in two columns. If i remove this:

@media
only screen and (max-width: 760px),
(min-device-width: 768px) and (max-device-width: 1024px) 

CSS apply also in desktop but if i put this css change doesnt apply in mobile.

#1911237

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Avansis,

What I need is the original reference to the css code.

This way I can understand the code in its full context. This snippet without much context to work with won't allow me to help you.

Thanks,
Shane

The topic ‘[Closed] View responsive’ is closed to new replies.