1 reply [Last post]
PippaKeeves
PippaKeeves's picture
Offline
newbie
Last seen: 2 years 11 weeks ago
Joined: 2021-03-10
Posts: 1
Points: 2

Hello! I'm a real newbie when it comes to coding, can someone take a look at this code and correct it. Needs to be JSON compatible. It's a mobile-friendly table instruction.

many thanks in advance

Pippa

  "@media (max-width: 768px)": {
    ".dataTables_filter": {
      ".table thead": {
        "display": "none"
      }
    },
    ".table, .table tbody, .table tr, .table td": {
      "display": "block",
      "width": "100%",
      ".table tr": {
        "margin bottom": "15px",
        ".table td": {
          "text-align": "right",
          "padding-left": "50%",
          "position": "relative",
          ".table td::before": {
            "content": "attr(data-label)",
            "position": "absolute",
            "left": "0",
            "width": "50%",
            "padding-left": "15px",
            "font-size": "15px",
            "font-weight": "bold",
            "text-align": "left"
          }
        }
      }
    }
  }
}

thepineapplehead
thepineapplehead's picture
Offline
Moderator
Last seen: 1 year 5 weeks ago
Timezone: GMT+1
Joined: 2004-06-30
Posts: 9683
Points: 819

What's wrong with it? You've

What's wrong with it? You've just posted a snippet of nested CSS, but we don't know what we're supposed to be looking for.

Verschwindende wrote:
  • CSS doesn't make pies