WordPress.org

Ready to get started?Download WordPress

Forums

CSS Width not real width (4 posts)

  1. nikairos
    Member
    Posted 3 years ago #

    Hi.

    I'm considering changing the width of my theme which is set at 960px.
    I thought this should be plenty but was struck by how narrow the site looks in comparison to a site I'm migrating from whose width is only 910px.

    I took a screen shot of the theme and measured it and it is, in fact, only 892px wide.

    Here's the test site:
    http://www.kairoscampaigns.org/test/wordpress/

    How is it that the css says it's 960px when it's actually only 892px, and how do I increase the width of the whole theme (892px is much to narrow for current displays)?

    Does anyone have any hints?

    Many thanks.

    Nik

  2. alchymyth
    The Sweeper & Moderator
    Posted 3 years ago #

    the width in the css is usually the width of the outermost div, i.e. #wrap in your theme.
    then there are borders, padding, ...
    so the actual 'content' area might be narrower.

  3. nikairos
    Member
    Posted 3 years ago #

    Thanks alchymyth

    Here's the offending style:

    #wrap {
    background: #EEEEEE;
    width: 960px;
    margin: 10px auto 10px;
    position: relative;
    border: 10px solid #333333;
    -moz-box-shadow: 0 1px 3px #000000;
    -webkit-box-shadow: 0 1px 3px #000000;
    }

    Even measured from the outermost wrap area (which excludes borders and margins) it's only 891px.

    Wierd...

    NIk

  4. nikairos
    Member
    Posted 3 years ago #

    I still don't have any explanation from anyone for this unusual error that appears to be css related.

    Any takers??

    Nik

Topic Closed

This topic has been closed to new replies.

About this Topic