• Resolved wickensworth

    (@wickensworth)


    I’m extremely new to PHP and I’m having trouble figuring out how to shorten the width of my webpage. I’m using veryplaintxt 2.3 as my theme.

    Ideally I’d like to shorten the width to about 80%, and then ad a separate background color for the remaining 20%. Anybody able to help on this will be rewarded with invisible cookies.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Hack about in your CSS. Look for #wrapper.

    We really need more information on what exactly you want to change… where do you want the remaining 20% (left or right?). Do you want content in there?

    But before we start making suggestions, you should correct one serious mistake: <body> includes <head> (not allowed). Furthermore, your divs are #container -> #wrapper -> #container -> #content. At least the first #container is unnecessary, maybe the second one as well. There are also lots of minor structural errors (with lists, headlines, etc). This will help you to eliminate them.

    By the way… this has nothing to do with php, it’s only a css issue, so don’t worry about limited php knowledge ;).

    Thread Starter wickensworth

    (@wickensworth)

    Sivar,

    Thanks for the <body> includes <head> advice. At one point I tried to fix some of those validation errors, but it makes my head hurt. I probably need to just sit down with a bottle of aspirin and a liter of vodka and fix those.

    Regarding the width, I’d like the remaining 20% distributed evenly on either side, so that my page is centered. I don’t want any content in that 20% aside from a slightly different background shade.

    Root,

    Changing the wrapper to 80% seems to screw up the margins of my sidebar, and the remaining space only appears on the right side. Again, I’m very new to (ahem) CSS, so all of this is daunting for me.

    Thanks for the help so far, you people are good folk.

    So far, so good. Be sure to include the first p-tag, which contains your header image and that bold piece of text, in <body> and the #wrapper-div, but before the #container-div starts.

    Now look for this in your style.css:

    div#wrapper {
    	margin: 3em 0 0 0;
    }

    and replace it with:

    div#wrapper {
    	width: 80%;
    	margin: 3em auto 0 auto;
    }

    Thread Starter wickensworth

    (@wickensworth)

    Sivar, thank you so much! You’re a big help. My page looks a lot slimmer just in time for the end of swimsuit season.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Changing width of webpage’ is closed to new replies.