2

I got an issue with the table's style.

When I try to change the <thead>'s padding, it doesn't change.

And it happens with more style element.

That's my code:

http://pastebin.com/xHhHMZmP

And here is the result: Table's result

2 Answers 2

2

One solution is to add the !important flag for your padding:

table th{
  padding: 50px !important;
  background-color: #ffb74d;
  color:#EEEEEE
}

jsFiddle Demo

Sign up to request clarification or add additional context in comments.

2 Comments

Thanks! can you just explain me what is the !important does?
@iYonatan - The !important flag overwrites any other styling (including inline) that may have affect on the elements given css property. E.g. you have an element that has an inline style with color black and in your external css you have the color set to blue. Normally inline styling overwrites external styling. But the !important flag tips it over. As in !important says, the element MUST use this property with this value.
0

After looking at your code, here is what I noticed. Your CSS is defining...

table th{
          padding: 50px;
         background-color: #ffb74d;
         color:#EEEEEE

     }

But on those <th> you've got classes and inline styles. Better to define all this in one place for consistency.

Try...

table > thead > th {
              padding: 50px;
             background-color: #ffb74d;
             color:#EEEEEE

                    }

2 Comments

Seems that there is padding there but the text is not vertically centered? Or did you just remove the orange background?
I didnt remove the background color

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.