Center wrap – PROSE

Community Forums Forums Design Tips and Tricks Center wrap – PROSE

This topic is: resolved

Tagged: , , ,

This topic contains 6 replies, has 2 voices, and was last updated by  dogstalkpoetry 10 months, 3 weeks ago.

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #87205

    dogstalkpoetry
    Member
    Post count: 34

    Hi! I like all my website content to be centered on the page.
    I’ve added a width value to #wrap like below but doesn’t seem to work. Help!

    #wrap {
    width: 940x;
    margin: 0 auto;
    }

    I even tried to add !important but still it doesn’t work.
    Thanks for any suggestions out there.

    #87318

    asterbird
    Participant
    Post count: 101

    what about #wrap { text-align: center; }

    If that doesn’t work, can you add a link to your page when you reply?

    #87458

    dogstalkpoetry
    Member
    Post count: 34

    Thanks, your suggestion didn’t work but did helped me to troubleshoot.
    Instead of #wrap, I used body.single instead which works. So basically :

    body.single {
    width: 940px;
    margin: 0 auto;
    }

    #87459

    asterbird
    Participant
    Post count: 101

    Oh, glad you found something that worked. :) you can mark this as resolved then

    #87465

    dogstalkpoetry
    Member
    Post count: 34

    Oh I just found out I need to add more classes to cover all the pages in my website so

    body.home, body.single, body.page, body.archive {
    width: 940px;
    margin: 0 auto;
    }

    I may be missing out on other body classes but this seems to work for now.

    #87468

    asterbird
    Participant
    Post count: 101

    only others I can think of are body.blog for blog pages, body.archive for CPT archives, not sure what search, category, and tag pages are.

    #87469

    dogstalkpoetry
    Member
    Post count: 34

    Unfortunately I just noticed that using body classes seem to prevent the responsive layout from working well, but maybe this problem belongs in another thread.

Viewing 7 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic.