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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T15:36:02+00:00 2026-05-29T15:36:02+00:00

I am new to CSS and we were tasked to create a simple website,

  • 0

I am new to CSS and we were tasked to create a simple website, I’ve decided to create a simple website dedicated to avril lavigne (please don’t judge me) everything is going well, my container div is always at the center, I don’t get it why my navigation bar inside my container is going beyond the lines of the border of my container. Here’s a screenshot

screenshot

As you can see the dashed border of my nav bar is going beyond the container.

Here are my CSS rules.

body{font-size: small; background-image:url(../images/bg.gif);margin:50px 0px; padding:0px;}
#container {width:600px; margin:0px auto;padding:15px; border:1px solid white;background-color:#fff;}
.navbar{width:625px; height:45px;font-size: 13px;height: 22px;font-weight: bold;border: 2px dashed pink;repeat-x;opacity:0.6;}

.button a{float:left;margin-right:50px;color: #000;text-decoration: none;text-align: center;width: 100px;height:25px;background: url(../images/nav.jpg) repeat-x;}

Here is my HTML:

<!DOCTYPE html>
<html>
 <head>
   <title>Avril Lavigne</title>
    <link rel = "stylesheet" type = "text/css" href="style/style.css"/>
 </head>

  <body>
     <div id = "container">

         <div id = "header">
            <img src = "images/header.jpeg">
         </div>

          <div class = "navbar">
            <div class = "button"  > <a href = "#">Home</a></div>
            <div class = "button"  > <a href = "#">Simply Avril</a></div>
            <div class = "button"  > <a href = "#">Images</a></div>
            <div class = "button"  > <a href = "#">Tour Dates</a></div>     
          </div>

           <div id = "Content">
            <p id = "about">
                "Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium
                doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis
                et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam voluptatem quia 
                voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui 
                ratione voluptatem sequi nesciunt. Neque porro quisquam est, qui dolorem ipsum quia dolor sit amet, 
                consectetur, adipisci velit, sed quia non numquam eius modi tempora incidunt ut labore et dolore magnam aliquam 
                quaerat voluptatem. Ut enim ad minima veniam, quis nostrum exercitationem ullam corporis suscipit laboriosam, 
                nisi ut aliquid ex ea commodi consequatur? Quis autem vel eum iure reprehenderit 
                qui in ea voluptate velit esse quam nihil molestiae consequatur, 
                vel illum qui dolorem eum fugiat quo voluptas nulla pariatur?"
            </p>    
           </div>


     </div>
  </body>
</html>
  • 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-29T15:36:03+00:00Added an answer on May 29, 2026 at 3:36 pm

    The container is 600px and the navigation bar is 625px. Your navigation bar is larger than the container, so it breaks through the container. The default overflow property is set to visible, that’s why you can still see it. Try changing the width of your navigation bar to be less than the content-box of your container. Here’s some information on the box-model.

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

Sidebar

Related Questions

I am new in CSS so please help me in this problem. I hope
My website uses a variety of technologies, such as JQuery, new CSS definitions (e.g.,
I'm pretty new to CSS and have found a nuance that I don't understand.
I am trying create a new css for shaping my detailsview. But i couldn't
I'd like create a new CSS class but based (inherited) from ui-state-default from jQuery
How can I achieve something simple like the following without creating a new css
I am new in CSS so have a simple question. here is my script
Can anyone please help me with this. I am new to css styling. I
How to add new css class or id and then write properties for html
I'm having a problem lining up some icons and am new enough to css

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.