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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T23:35:28+00:00 2026-05-26T23:35:28+00:00

learning html/css here. I’m trying to add a border-bottom to my .menu ul li

  • 0

learning html/css here. I’m trying to add a border-bottom to my .menu ul li ul li

.menu ul li ul li{
padding:0;
float:none;
margin:0 0 0 0px;
width:100%;
border-bottom: 1px solid #911;
}

but the border gets cut off on the right because of the right padding in this style:

.menu ul li ul{
position:absolute;
right: 0px;
border:1px solid #911;
/*box-shadow*/
-webkit-box-shadow:0 1px 5px #CCCCCC;
   -moz-box-shadow:0 1px 5px #CCCCCC;
        box-shadow:0 1px 5px #CCCCCC;
margin-top:0px;
display:none;
padding:0px 16px 0px 0px;
}

I’m confused about why the right padding of 16px is needed… When I remove the right padding my drop down menu no longer displays correctly (the border is off and when you drop down the menu it expands to the right and causes a scroll bar to appear).

Also there is missing space on border in the bottom left corner of the drop down menu, any ideas why this is happening?

http://jsfiddle.net/vJaaR/

Thanks a ton! I really appreciate any insights.

  • 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-26T23:35:29+00:00Added an answer on May 26, 2026 at 11:35 pm

    If you use a width of 100% AND also apply border, padding, or margin, then your content will be larger than 100%.

    For example, if your page width is 900 pixels wide.

    100% of 900px is 900.
    If you apply a 16 pixel padding to both the left and right, that adds 32 pixels.
    If you apply a 1 pixel border, that’s another 2 pixels.
    If you add a 10 pixel margin to the left and right, that’s another 20 pixels.

    When you add it all up, the width of your element will be:

    900 + 32 + 2 + 20 = 954

    update
    If you have a block level element (display: block), you don’t need to specify the width as being 100%. If you tell it to have a specific padding, margin, and border, then the width will take up the rest of the space (width: auto).

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

Sidebar

Related Questions

learning html/css here. I can't seem to understand how to tweak this drop down
I've just recently started learning HTML/CSS and I've been trying to teach myself sound
I'm learning css and trying to change background-color of all html except one div
I'm learning CSS/HTML and am trying to import a simple css class into the
I am new to programming (previously only did html/css/design) trying to start learning RoR
I'm a fairly inexperienced web designer learning css/html on the fly for a company's
I´ve just started learning GWT and I´m trying to implement http://gwt.google.com/samples/Showcase/Showcase.html#!CwFileUpload and but failing
I'm learning CSS and HTML. In my code I have: <style> table, td, th
I began learning html/css and throughout my learning I have seen the idea of
Okay so i'm learning html right now and soon css. In my html coding

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.