top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

How to positioning image banner on a wordpress site?

0 votes
418 views

In my wordpress site I have a picture in header section. On a full screen it looks ok but on mobile and when minimized the picture is on the left of the page. I would like it to be on the right. I thought that maybe I had to use CSS to reposition it so I did the following:
.widget-header img { float: left; } to .widget-header img { float: right; }
in hopes that it would work. However nothing seems to have changed. Can anybody help me how I fix this problem?

posted Jul 24, 2017 by anonymous

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

0 votes

Style parent of img from float:left to float:right

@media screen and (max-width: 728px){
  .widget-header {
    max-width: 100%;
    float: right; //change this
    margin-top: 0;
  }
}
answer Aug 20, 2017 by Shyam Chakraborty
Similar Questions
0 votes

I want to create a separate custom 404 page for my wordpress site that when 404 error occurs then that page will be display. I create a 404 page but when I tried to test it, the 404 page of the root site appears. Can anybody help me?

0 votes

I am a beginner in WordPress. I have already set up my WordPress-Theme for Desktop and I am happy with it and now I have tried to make some tweaks in the theme for the mobile device, but when I open my page on my mobile phone, those changes don't show up.

I have tried to make the theme for mobile device by overwriting the CSS-Selectors with the following:

@media (max-width: 700px) {
    …
}

But this is does not work on mobile device. How can I solve this? Can anybody help me?

0 votes

I need to force HTTPS for my e-commerce site, but when I try, it goes into an HTTPS -> HTTP -> HTTPS loop. I reviewed my .htaccess, by couple of experienced techs but they found no issue on that. I checked my wp_config.php, and nothing there. Where else should I be looking? How would I hunt this down?

0 votes

I am trying to convert an jpg image on my Wordpress blog to base64. I use this php code but it's not working:

$thePostThumb = get_the_post_thumbnail($postId, array(150,150));
background-image: url(\'data:image/jpg;base64,' . base64_encode($thePostThumb) . '\');

I have also tried this method:

$type = pathinfo(get_the_post_thumbnail_url($postId, array(150,150)), PATHINFO_EXTENSION);
$data = file_get_contents(get_the_post_thumbnail_url($postId, array(150,150));
$base64 = 'data:image/' . $type . ';base64,' . base64_encode($data)

I know the thumb image is being retrieved, just can't get it working. Anyone know what might be going on.

...