I am using the Facebook Like social plugin on my website, and every time the page loads, the plugin stretches the height of the div it is in until the plugin has loaded.
I did define the height of the div that the social plugin is in, but even though the height stayed the same, you could still see the shift. I am also using the Twitter and Google plus social plugins - this makes the shift more noticeable since they get shifted also (shift under the h3 heading).
.socialBookmarks {margin:30px 0;padding:5px 15px;overflow:hidden;}
.socialBookmarks .social-wrap
{display:inline-block;vertical-align:middle;}
.social-wrap .ezimageBox {float:left}
<div class="socialBookmarks">
<h3 class="inline-block">Share:</h3>
<div class="social-wrap clearfix">
<div class="ezimageBox">
(loads twitter social plugin)
</div>
<div class="ezimageBox">
(loads google plus social plugin
</div>
<div class="ezimageBox">
(loads facebook social plugin)
</div>
</div>
</div>
Anyone have any ideas on how to work around this problem? :)
Setting the width and height of the wrapping <div> (in your case, .ezimageBox) usually does the trick for me.
Try this:
.social-wrap .ezimageBox {float:left, width:100px, height: 20px; overflow:hidden;}
Does it still flicker?
Related
TL;DR how can I get the images to fill the grid squares on this page.
I am working on a site I inherited that has been through three different web designers so it's a bit of a mess on the back end. It also uses timber/twig/acf which were new to me so I spent last week trying to figure out how everything is configured. I was trying to replicate this archive page so was playing around with the CSS but when I left work Friday everything was fine...this morning suddenly the images don't fill the grid squares. I don't know if something I did changed it and it was delayed bc of caching or if there was an update or what but I would love to change it back before anyone notices. I actually have the old version of the page still open where the images do fill grid squares and have spent all day looking through the code to see what changed but can't find any difference.
It's this css rule that preventing it from taking 100% width:
.rtr-6-grid:not(.knowledge-cta) .p-absolute.p-center div {
width: 470px;
}
Change this :
<div class="d-flex d-flex--y-center d-flex--x-center p-absolute p-center rtr-fill">
<div>
<img src="..." width="1779" height="1779">
</div>
</div>
To this :
<div class="p-absolute">
<div>
<img src="..." width="auto">
</div>
</div>
I am working on my website at the moment. And I realized, when looking at the mobile site that one of my images stretches/changes it's aspect ratio. Keep in mind this is only on iPhones. I had a few friends look at the site, and only the people with iPhones had the image stretched like this.
This is the page on the browser
This is the page on my iPhone 11
<div class="col d-flex d-md-flex d-xl-flex justify-content-center align-items-md-center">
<img class="d-xl-flex align-items-xl-center" src="assets/img/headshot.jpg" style="max-width: 90%;">
</div>
I originally had height: auto; in there as well, and when trying to solve this issue I found an older post saying that could be the issue. Sadly it did not resolve it.
I know I can easily solve this problem with media queries, but there must be a reason why this happens only on iPhone. I also only have in body styling on this image, you can see it on the browser preview on the inspector.
If you would like to look at it yourself. The Website URL is https://www.robinalexander.at/about-me
Try to remove the classes d-xl-flex align-items-xl-center from img and give it a display: block. The parent div will keep the img in place
Hoping someone here can help me, I installed a wordpress theme on a site ( http://nationalaviationinstitute.ie/ ) and I have an issue I can't resolve and the developer of the theme is refusing to acknowlege the issue!
If you visit the above site in Chrome, the bottom section of the site jumps up and covers the four service areas underneath the image slider. This only happens in Chrome, it's ok in all other browsers, it's obviously something to with the responsiveness of the site as if you resize the bottom section moves back to the correct position.
I'm fairly familiar with CSS and HTML so if anyone could give me a hand figuring out the cause of this and a possible solution I'd greatly appreciate it.
Thanks,
Anthony
There is a javascript bug which is giving the divs inside each <li> tag style="height: 0px;" on resize event like the example below:
<li class="span3 thumbnail">
<div class="block-thumbnail maxheight col" style="height: 0px;">
<i class="icon-3x icon-cogs"><i class="circle-border"></i></i>
<h3>Our Courses</h3>
<p>At NAI we have a number of different courses to suit everybody’s needs, academic to professional. <a class="link" href="http://nationalaviationinstitute.ie/courses/">read more →</a></p>
</div>
</li>
if you find and fix the js that is causing this problem than the problem will be fixed.
But incase you need a faster fix you can add the following css:
.block-thumbnail{
display: inline-block;
}
It will override the style="height: 0px;" added by the js and the bottom section will be pushed down
As the title suggests I am currently looking for a way to add a CSS class to the ad divs on my site provided by Google's DoubleClick For Publishers.
I have a sidebar on the site containing my ads which I wish to display in such a way that they have a 10px margin separating each ad.
I have a workaround at the mo by targeting every google div in the stylesheet and setting the margin-top to 10px. So:
#google_ads_div_MySite_Home_MPU1_300x250_ad_container, #google_ads_div_MySite_SiteWide_LargeButton1_300x100, #google_ads_div_MCV_SiteWide_LargeButton2_300x100{margin-top:10px;}
However this is incredibly messy and involves meticulously checking the stylesheet to check every single ad has been defined. Across a large site this can be a nightmare.
Can anyone help?
Instead of modifying the id of the ad div with your css, apply your CSS to the child of the container of the ads.
Your html probably look like
<div>
<div id="google_ads_div_MySite_Home_MPU1_300x250_ad_container">some ad</div>
<div id="google_ads_div_MCV_SiteWide_LargeButton2_300x100">some other ad</div>
</div>
just change it to
<div class="ad_container>
<div id="google_ads_div_MySite_Home_MPU1_300x250_ad_container">some ad</div>
<div id="google_ads_div_MCV_SiteWide_LargeButton2_300x100">some other ad</div>
</div>
and in css :
.ad_container div {margin-top:10px}
How can I maximize the size of the div that plays the role of "content"?
I recognize that this may simply be a basic CSS question, but it feels like it is tied to CSS in jQueryMobile.
I'm placing a Google Map in the content div and I'd like the map to fill the available verticle space on the mobile browser. Instead, it's a fixed size of about 10px (give or take).
<div data-role="page">
<div data-role="header" class="ui-header ui-bar-a">Header</div>
<div data-role="content" class="ui-body ui-content">
<div id="divMap">google map via javascript</div>
</div>
<div data-role="footer">footer</div>
In this case, jQueryMobile always creates the minimal size for its contents, and I always want it to be 80% of the available page.
You could probably use jQuery (I haven't worked with jQuery mobile, though, so this might not work directly):
$(document).ready(
function(){
$('#content').height($(window).height()*0.8);
}
);
JS Fiddle demo