WordPress.org

Forums

Asteroid
[resolved] How to make header widget tight aligned (5 posts)

  1. 98Chimp
    Member
    Posted 1 year ago #

    I have added an Adsense unit in my Header using text in the 'Header' widget. I have made it right aligned using <p align="right"> before the Adsense code, but there is still a gap at the right side.
    You can see the problem at my site http://www.chimpytech.com

    Do I need custom CSS to fix this or is there another solution?

    Thanks

    Neil

  2. Meiji
    Member
    Posted 1 year ago #

    Hi! Yes, you could try with custom CSS, something like this:

    <p id="to-right">Sponsored Ad</p>

    And then the CSS:

    #to-right {
    text-align: right !important;
    }

  3. 98Chimp
    Member
    Posted 1 year ago #

    Thanks for the speedy reply Meiji, unfortunately there is no change.

    I am wondering if this is caused because I have made the content and sidebar a little wider using the themes options (750px & 274px respectively) and it appears that the theme still thinks the Header is the original width?

    I am very new to WordPress and am learning this by experimenting!

    Neil

  4. Meiji
    Member
    Posted 1 year ago #

    Sorry, I just realized p is inside an element which is aligned to left, so the code above won't work. Add this code to a custom CSS:

    #widgets-wrap-header {
    display: inline-block;
    float: right;
    }

    It will be solved this way.

    Cheers!

  5. 98Chimp
    Member
    Posted 1 year ago #

    Thank you Meiji you are a genius. The second solution works perfectly.

    Thanks

    Neil

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic

Tags

No tags yet.