1 reply [Last post]
PippaKeeves
PippaKeeves's picture
Offline
newbie
Last seen: 5 weeks 3 days 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
Guru
Last seen: 4 weeks 1 day ago
Joined: 2004-06-30
Posts: 9674
Points: 810

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