WordPress.org

Ready to get started?Download WordPress

Forums

Preference Lite
[resolved] header image (14 posts)

  1. annasz
    Member
    Posted 1 year ago #

    Hi, I just updated the theme to the newest version, and now I have the the header image is not centered but on the left side of the showcase.

    I had the same problem, when I tried it on the old version, there I tried it as widget in the showcase header, because i wanted the header image to appaer on all pages. But when I then did it as the simple header image it was no problem an the picture was centered. Now, after the update, its not possible.
    http://www.kettenreaktion.co.at/wordpress/

    In general I find it difficult to position pictures at the place where I want them to be, but that might be because I'm kind of unexperienced in this.

    Hope you can help me :) and I really like the style of the theme :)

    thanks, anna

  2. StyledThemes
    Member
    Theme Author

    Posted 1 year ago #

    For the widget, and when an image needs to be smaller than 1170px wide, here is a solution for you. Wrap the image in a div container with some css inline styling. For example, your setup could be done like this:

    <div style="width: 828px; margin:auto;">
    <a href="http://www.kettenreaktion.co.at/wordpress/">
    <img src="http://www.kettenreaktion.co.at/wordpress/wp-content/uploads/2013/03/cropped-domino-neu.jpg" class="header-image" width="828" height="260" alt="" /></a>
    </div>

    ...or you can even do this which will center everything inside the div container:

    <div style="text-align: center;">
    <a href="http://www.kettenreaktion.co.at/wordpress/">
    <img src="http://www.kettenreaktion.co.at/wordpress/wp-content/uploads/2013/03/cropped-domino-neu.jpg" class="header-image" width="828" height="260" alt="" /></a>
    </div>
  3. annasz
    Member
    Posted 1 year ago #

    ?? as I sayed, I'm kind of unexpericend... so this is the answerd to the question about pictures in general? I'll try to figure it out ;)

    whats more important is that I want to know, why the header was centered in the version 1.5 and is not centered anymore in version 1.6.2? can I de-install version 1.6.2 and get back to the old version then?

  4. StyledThemes
    Member
    Theme Author

    Posted 1 year ago #

    Not sure why it was centered before....but for the code I provided above, you would simply copy the code (either one) into the widget you are using for the showcase area which will give you your centered image.

    As for reverting back to the previous version, you would need to delete the existing theme files and replace them with the previous version...although I would recommend doing this cautiously if you've done any customization with theme files or the theme option settings. Always keep a full backup copy before doing any changes (or removal and replacement) first.

  5. annasz
    Member
    Posted 1 year ago #

    But I didn't have it as a widget before (because it didn't work to center it), but I put it as "header image" in the navigation: adjust header image.

    any chance to center it without widget? just the way it was before?

    and I will try if I get it to work with the widget... but the first try didn't work...

  6. StyledThemes
    Member
    Theme Author

    Posted 1 year ago #

    If you are not wanting to use the widget method but prefer to use the WP Custom Header, I just tried this on my local site that I use for testing and uploaded your image you are using...the image is centered. IF you still run into problems, please send me (by contacting me from my site's contact form) with a login and I will be happy to take a quick look.

    **actually I stand corrected. I will look into this and follow up in a few minutes.

  7. StyledThemes
    Member
    Theme Author

    Posted 1 year ago #

    ok, I have a quick fix for you, but it means you will be editing the theme's style.css file so when there are updates to this theme, this will be overwritten (which is why using a child theme for modifications is best and recommended). However, in your style.css file look for line 172 which should have this:

    #showcase p {
    	margin:0;
    }

    Just above that code, add this:

    #showcase{
    	text-align:center;
    }

    Because of how the responsiveness works, it's not making alignment easy, but that code will center the image. I will look into an update to the theme and future themes so that showcase and header images are easier to manage with alignment.

  8. annasz
    Member
    Posted 1 year ago #

    thank you :) :)

  9. annasz
    Member
    Posted 1 year ago #

    sorry... just one quick question.... if I want to center a picture in a image widget on the page right sidebar, is that also possible? I can either put it right or left, but not centered... and to change the height of the place where it appears? or is this too complicated?

  10. StyledThemes
    Member
    Theme Author

    Posted 1 year ago #

    It would be the same way as the two code samples I did further up...but to simply, wrap the image:

    <div style="text-align: center;">
    your image here
    </div>

    Or you could try this too:

    <img src="your image path" style="margin:auto;" alt="description" />
  11. annasz
    Member
    Posted 1 year ago #

    hhhmm... wrap a picture in an image wigdet? theres no space to add any text, as far as I can see. will try it tomorrow :)

  12. StyledThemes
    Member
    Theme Author

    Posted 1 year ago #

    ah... that changes then. but... the aligncenter class should be working. This one I'm going to have to try and solve because it worked before so something must have changed. This one is going to take me some time to find why it's not working now, because it did with the WP test content. I will get on this today.

  13. StyledThemes
    Member
    Theme Author

    Posted 1 year ago #

    found the fix.... adding to the theme's style.css the following:

    img {display: block;}

    Then when you want to center an image, add the class="aligncenter" to it.

  14. annasz
    Member
    Posted 1 year ago #

    that works, thank you, and I like it, but now my header is not centered anymore... ;) so now I would have to to it as an image widget in the showcase header and then add "align center" to it?

    thanks in any case for your efforts!

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic

Tags

No tags yet.