WordPress.org

Ready to get started?Download WordPress

Forums

WP-TopBar
[resolved] How to add container around text/center as screen widened. (6 posts)

  1. walkerau
    Member
    Posted 1 year ago #

    I need to be able to add a container width to the text area, so I can have it left aligned, but be centered in the page as the browser window expands, if that makes sense? Essentially I need a width, and margin: 0 auto; for the container around the text.

    http://wordpress.org/extend/plugins/wp-topbar/

  2. Bob
    Member
    Plugin Author

    Posted 1 year ago #

    Right now you have two CSS selectors to work with:

    <div id="topbar">
    <p id="wptbheadline"></p>
    </div>

    I think you are asking for a new selector such that:

    <div id="wptopbar">
    <div id="topbar">
    <p id="wptbheadline"></p>
    </div>
    </div>

    Then you can use your own CSS stylesheet to style the new selector.

    Right?

  3. walkerau
    Member
    Posted 1 year ago #

    Well I need to be able to control what's in the second selector in order to set a width. If it's set before the two current selectors,I won't be able to have 100% width on the background bar.

  4. Bob
    Member
    Plugin Author

    Posted 1 year ago #

    Hmm. If I add the new DIV, you can use your own stylesheet to format that (center, 100% width) and then use the options in the plugin to style the text line (left aligned. etc).

    Or am I missing something?

    Do you have a better option?

  5. walkerau
    Member
    Posted 1 year ago #

    The top div is what gives fixed position. I don't want to mess with that, just the text on the inside. I don't have a better option, that's why I'm asking for help :o)

  6. Bob
    Member
    Plugin Author

    Posted 1 year ago #

    You you tried this, entered in the last CSS field box (For the Entire TopBar):

    top: 40; width: 240px; z-index: 99999;margin: 0 auto; text-align: left;

    It worked for me. I created a small, centered text box that had the text left aligned.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.