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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T10:15:10+00:00 2026-06-13T10:15:10+00:00

Quick CSS Question. I cannot seem to figure out a very simple CSS/HTML problem.

  • 0

Quick CSS Question. I cannot seem to figure out a very simple CSS/HTML problem. Here’s a JSFiddle.

http://jsfiddle.net/BmM6t/

Basically, these two divs are not resizing to anything less than 100% width:

<div id="main_pic" class="main_div">
       THIS IS WHERE THE MAIN PIC WILL GO.
    </div>
    <div id="signin" class="main_div">
       SIGN IN TO THE SITE!
       <form>
           <label for="name">EMAIL/USERNAME:</label>
           <input type="text" name="name" id="name">
           <label for="email">PASSWORD:</label>
           <input type="text" name="email" id="email">
           <br />
           <input type="submit" value="Let's Play!">
       </form>
    </div>

You’ll see that the two divs with class main_div actually take up the entire width of the screen for some reason (you can see that if you inspect the element) even though their widths are clearly written. When you try to change the width of one of the main_div’s it changes the width but if you inspect the element, it just changes the width of the object and adds padding around it to make sure it still takes up the entire width of the screen.

I’m sure it’s some little error I’ve made but I can’t find it. Thanks for the help!

  • 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-06-13T10:15:11+00:00Added an answer on June 13, 2026 at 10:15 am

    That’s how divs work, they are block level elements. If you don’t want them to take up the entire with of its container element you can float it or make it inline-block

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

Sidebar

Related Questions

Quick Question: Anyone knows this? : http://lwis.net/free-css-drop-down-menu/ It uses javascript for -IE6 only, but
Just a quick simple question, this css code will not work in ie8 for
Just a quick question, that I cannot fathom out, hope you guys and girls
Very quick and hopefully simple question. I am trying to select a hidden input
Quick question; I replaced a .css file which I was referencing in html/php that
I have a quick question about HTML and CSS. I thought this would be
I found this question here on SO and the solution is pretty simple: jsfiddle:
I got a quick question about sprites in css: Will I send two HTTP
Quick question here guys, I cant seem to get this $('#wrap').on('toggle', '#image', function(){ <!--
I have a quick question with some jQuery where I'm running into a problem.

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.