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 834153
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T04:37:57+00:00 2026-05-15T04:37:57+00:00

is this right to use px and % both for one element like .box{

  • 0

is this right to use “px” and “%” both for one element like

.box{
padding:10px 2% 0 3%;
}

is this right to use in css.

  • 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-15T04:37:57+00:00Added an answer on May 15, 2026 at 4:37 am

    As stated in the CSS 2.1 specification for padding (emphasis mine)

    The ‘padding’ property is a shorthand property for setting ‘padding-top’, ‘padding-right’, ‘padding-bottom’, and ‘padding-left’ at the same place in the style sheet.

    If there is only one value, it applies to all sides. If there are two values, the top and bottom paddings are set to the first value and the right and left paddings are set to the second. If there are three values, the top is set to the first value, the left and right are set to the second, and the bottom is set to the third. If there are four values, they apply to the top, right, bottom, and left, respectively.

    So padding: 10px 2% 0 3%; is equivalent to

    padding-top: 10px;
    padding-right: 2%;
    padding-bottom: 0;
    padding-left: 3%;
    

    This is perfectly valid CSS.

    Have fun!

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

Sidebar

Related Questions

Is this the right way, to use boost::shared_ptr for the nodes left and right
I was wondering how I could sort this array, when I use asort right
Right now I can use this URL to request a Google Static Maps image
I'm learning this right now so the questions might be a little juvenile. Here's
Do I have this right ... // Reactor.h @property(nonatomic, retain) NSMutableArray *reactorCore; // Reactor.m
Not sure I heard this right, but VS2010 no longer has support for Wix?
I have this right now: <%= f.select :credit, (0..500) %> This will result in
I need some help to get this right, please. I have created an iPad
I need some help in getting this right, problem Write a function which takes
I have had a few problems getting this right, so I wanted to ask

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.