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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T04:03:58+00:00 2026-05-23T04:03:58+00:00

This simple HTML5 layout is intended to have a navigation bar on the left

  • 0

This simple HTML5 layout is intended to have a navigation bar on the left with body text floated alongside it (using percentages rather than pixels for a fluid, responsive design – calculations are in comments within the CSS.)

http://www.wturrell.co.uk/stackoverflow/20110615-01.html

The widths of elements inside the ‘page’ div add up to 100% exactly. I want to add padding to certain elements, in this case the nav. If I remove all the padding, they float correctly, but more than 1 or 2 pixels of padding (regardless of what units it’s specified in) and it breaks. I don’t understand why this is breaking the layout as it’s padding so surely shouldn’t alter the overall size of the block?

What have I missed?

Update – solution:
http://www.wturrell.co.uk/stackoverflow/20110615-02.html

(Element display width = width plus border plus padding. Navigation should be nominal 200 pixels in total with 20px padding on right, so for fluid design, width = 180/900*100 or 20%, padding = 20/900*100 or 2.222% and body text remains 700/900*100 or 77.777%.)

  • 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-23T04:03:59+00:00Added an answer on May 23, 2026 at 4:03 am

    In the CSS box model, the padding is added to the width to get the overall size of the box. In your case, if the width percentages add up to 100%, even 1px would mean that the content overflows.

    Try setting the padding in percentages and take that into account when adding them up or leave a buffer of 1 or 2 percent at the edges and add the small paddings in pixels.

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

Sidebar

Related Questions

I am trying to build this very simple (visually speaking) layout using HTML/CSS that
Pulling my hair out with this simple CSS layout. I have a 2-column fixed
i have this simple layout css which provide 3 rows layout css code <style
I have this simple code: <html> <head> <title>My Cake Blog Application</title> <?=$html->css('styles');?> </head> <body>
Take a very simple case as an example, say I have this URL: http://www.example.com/65167.html
Say I have this simple form: class ContactForm(forms.Form): first_name = forms.CharField(required=True) last_name = forms.CharField(required=True)
I have this simple regex, [\d]{1,5} that matches any integer between 0 and 99999.
I'm using this simple regular expression to validate a hex string: ^[A-Fa-f0-9]{16}$ As you
I have this simple Jsp page: <%@ page language=java import=java.awt.Color%> <% Color background =
I have this simple php script <?php echo '<pre>'; // Outputs all the result

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.