Skip to main content
LGMTL
Inspiring
June 9, 2017
Answered

Can't target td in table

  • June 9, 2017
  • 1 reply
  • 275 views

I can't target the td tags within a table, DW shows the preview properly but when I upload to the server the td style isn't applied. I'm able to target the tr but not the td within the same table.

I have the following in the Global style sheet section targeting the table, I can see the tr has the style applied but not the td:

.table-specifications tr {

  padding: 30;

  border-bottom: 1px solid #ccc;

}

.table-specifications td    {

  padding: 30;

}

Here's the Markup

Here's the URL​​  ("specifications" tab)

Thanks for your help,

Brandon

    This topic has been closed for replies.
    Correct answer osgood_

    brandonw6890098  wrote

    I can't target the td tags within a table, DW shows the preview properly but when I upload to the server the td style isn't applied. I'm able to target the tr but not the td within the same table.

    I have the following in the Global style sheet section targeting the table, I can see the tr has the style applied but not the td:

    .table-specifications tr {

      padding: 30;

      border-bottom: 1px solid #ccc;

    }

    .table-specifications td    {

      padding: 30;

    }

    Here's the Markup

    Here's the URL  ("specifications" tab)

    Thanks for your help,

    Brandon

    You need to give the numerical value 30 a unit of measurement i.e. px

    padding: 30px;

    Youre missing the 'px'

    1 reply

    osgood_Correct answer
    Legend
    June 9, 2017

    brandonw6890098  wrote

    I can't target the td tags within a table, DW shows the preview properly but when I upload to the server the td style isn't applied. I'm able to target the tr but not the td within the same table.

    I have the following in the Global style sheet section targeting the table, I can see the tr has the style applied but not the td:

    .table-specifications tr {

      padding: 30;

      border-bottom: 1px solid #ccc;

    }

    .table-specifications td    {

      padding: 30;

    }

    Here's the Markup

    Here's the URL  ("specifications" tab)

    Thanks for your help,

    Brandon

    You need to give the numerical value 30 a unit of measurement i.e. px

    padding: 30px;

    Youre missing the 'px'

    LGMTL
    LGMTLAuthor
    Inspiring
    June 9, 2017

    lol... I'm an idiot.  Thank you.

    Legend
    June 9, 2017

    brandonw6890098  wrote

    lol... I'm an idiot.  Thank you.

    No not really, these things happen all the time, no matter how experienced you are. What happens then is you become more confused because what you think should work doesn't. You can literally test code for some time before spotting what is missing even though it's staring you in the face. Part and parcel of the job.