Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6807289
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T19:48:50+00:00 2026-05-26T19:48:50+00:00

I’m working with Vaadin, a GWT like framework for developing rich web applications. Now

  • 0

I’m working with Vaadin, a GWT like framework for developing rich web applications.

Now I want to set the padding of a generated HTML-tag element in my markup and I’m having big problems with it…

This is how the markup looks taken from Firebug:

enter image description here

The tags

  • v-formlayout-captioncell
  • v-formlayout-errorcell
  • v-formlayout-contentcell

all have padding-top: 12px and padding-bottom: 12px, I would really like to change this padding to 2px, but I can’t seem to get it to work.

I’ve already tried these combinations among others:

.v-formlayout-captioncell td {
    padding-top: 2px;
    padding-bottom: 2px;
}

v-formlayout-row td {
    padding-top: 2px;
    padding-bottom: 2px;
}

.v-formlayout-row th,
.v-formlayout-row td {
    padding-top: 2px;
    padding-bottom: 2px;
}

But none of them does any impact on the padding… could someone with better knowledge about CSS and HTML than me please take a look at this and give their opinion on how a CSS class should be written to do what I want. If you want me to provide more information then please ask! =)

Thanks in advance!

EDIT: Thank you Taryn East for your nice and graspable answer, it definitely taught me something new about CSS syntax! However, it seemed like the biggest problem I was having was that the padding parameters I was adding was overridden by the browser. But by using the !important CSS flag and writing the class as such it was fixed:

.v-formlayout-row td {
    padding-top: 2px !important;
    padding-bottom: 2px !important;
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T19:48:51+00:00Added an answer on May 26, 2026 at 7:48 pm

    If the class is in the td, then it should be:

    td.v-formlayout-captioncell
    

    the css here is saying is “find a td with the class ‘v-formlayout-captioncell'”
    By comparison, your css is saying: “find a td that is a descendant of something with the class ‘v-formlayout-captioncell'”

    Edit:

    The reason why the formatrow isn’t working is because CSS always picks the innermost style ie for

    <tr class="a"><td class="b"></td></tr>
    

    then anything in class b will override anything similar in class a.

    In your case – the per-td padding was being set by an outside class, and you weren’t overriding it with your 2px padding on the td… and any padding you were putting in the tr was simply being overridden by the outside-defined class on the td.

    “important” fixes that because that gives it a priority to the tr styles that overrides the innermost-td style despite them being “more inner” – because they only have normal priority. However – this is kind of a bit of a hack that is unnecessary in your case.

    The better-practise fix is just to use the td.v-formlayout-captioncell class

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I want to count how many characters a certain string has in PHP, but
For some reason, after submitting a string like this Jack’s Spindle from a text
I have a jquery bug and I've been looking for hours now, I can't
this is what i have right now Drawing an RSS feed into the php,
I would like to count the length of a string with PHP. The string
I've got a string that has curly quotes in it. I'd like to replace
I want use html5's new tag to play a wav file (currently only supported

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.