DIV will not stretch across width of screen

Posted on 2012-08-15
Last Modified: 2012-08-15
This page is specifically for hand held devices, but the problem can also be seen on a regular browser:

I have the divider lines like this:

<div class="divider"></div>

And styled like this:

.divider{background-color:#bfbeaf;margin:0.4em 0 0.4em 0;padding:0 0 0 0;height:0.1em;width:100%;}

But they leave a space on the right side, even though margin-right is zero. How can I make these stretch all the way across, like the nav buttons do?

Thank you!
Question by:bbdesign
    LVL 10

    Accepted Solution

    The page looks fine from my Android phone but you can fix the extra space by removing the width: 100% from the .mobilenav and .divider declarations.

    Author Comment

    Ah, of course... DIV's stretch across by default. Thanks!

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How to improve team productivity

    Quip adds documents, spreadsheets, and tasklists to your Slack experience
    - Elevate ideas to Quip docs
    - Share Quip docs in Slack
    - Get notified of changes to your docs
    - Available on iOS/Android/Desktop/Web
    - Online/Offline

    Most web designers often experience crossbrowser issues during interface design / development.  On common problem is with Internet Explorer due to its rendering discrepancies between previous versions.  Here are some techniques I use to help avoid c…
    Introduction If you're like most people, you have occasionally made a typographical error when you're entering information into an online form.  And to your consternation, the browser remembers the error, and offers to autocomplete your future entr…
    In this tutorial viewers will learn how to position overlapping items using z-index in CSS. They will also learn the restrictions on the z-index property.  Create a new HTML document with an internal stylesheet.: Create a div in CSS and name it Red.…
    In this tutorial viewers will learn how to style different bullet points for unordered lists in CSS. Begin with a normal unordered list; the default bullet point is a solid circle: In the CSS, create a defined class of unordered list by typing "ul.S…

    779 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    14 Experts available now in Live!

    Get 1:1 Help Now