Netscape Incorrectly Renders Floating Share Bar - css

I have been experimenting by adding a floating social media share bar to my web page.
The bar renders perfectly in I.E, Firefox, Opera, Chrome, and Safari, but refuses to behave when viewed in Netscape Navigator 9.
It's important for the bar to render properly in all of the above, and thought the problem might perhaps be due to something else on my web page interfering with its correct operation. However, when I test the bar using the mock up page I have posted a link to here, the same problem still exists.
Can anyone suggest what alterations I might make to the source code in order for this problem to be overcome?
Here's a link to my demo page.
http://www.corncreations.co.uk/test/floating_bar.html
Here's a link to the creators page, which includes the source code.
http://www.myblogger-tricks.com/2013/09/add-awesome-floating-sharing-bar-on.html
Any constructive advice gratefully received.
The code used for the demo is available by visiting the second of the links (above), but anyway, here it is:
<style type="text/css">
#floating_bar {
background-color:#fff;
position:fixed;
padding:0 0 3px 0;
bottom: 30%;
margin-left:-60px;
float:left;
border: 1px dotted #f7f7f7;
border-radius: 5px;
-moz-border-radius:5px;
-webkit-border-radius:5px;
z-index:10;
}
#floating_bar {
clear:both;
}
</style>
<div id='floating_bar'>
<div style='margin:10px 0 5px 13px;' id='like'>
<div class="fb-like" data-send="false" data-layout="box_count" data-width="40" data-show-faces="false"></div>
</div>
<div style='margin:0px 0 0 10px;' id='gplusone'>
<g:plusone size="tall"></g:plusone>
</div>
<div style='margin:5px 5px 5px 6px;'>
Tweet
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
</div>
<div style='margin:5px 5px 5px 5px;' id='linkedin'>
<script src='http://platform.linkedin.com/in.js' type='text/javascript'></script>
<script data-counter='top' type='IN/Share'></script>
</div>
<div style='margin:0 0 10px 11px; id='su'>
<script src="http://www.stumbleupon.com/hostedbadge.php?s=5"></script>
</div>
<p style='line-height:0px; margin-bottom:8px; font-size:10px; font-weight:bold; text-align:center;'><a href='http://www.myblogger-tricks.com/2013/09/add-awesome-floating-sharing-bar-on.html' rel='nofollow' style='color:#333;'> Get Widget</a></p>
</div>
As to what I've researched and tried so far - I've read other posts on this forum, and also Googled for an answer, but apart from reading a few posts elsewhere from others having difficulty with their Facebook Like buttons not rendering properly in Netscape, nothing else seemed relevant. I haven't tried altering the original source code yet, as I am not sure what to do that might correct the problem.

1. There's a point when backwards compatibility goes too far.
why Netscape fails to render the bar in the same way as all the other main browsers
You're implying that Netscape is a "main browser" like the browsers you mentioned in your question. Netscape used to have a significant market share, but its time has passed (see History of the web browser on Wikipedia, specifically the timeline chart at the bottom of the article; Also Usage share of web browsers for current statistics).
It makes the question irrelevant from a practical standpoint. It's hard to justifying the question let alone finding an answer, given that you're attempting to support a legacy browser.
But let's assume you have a valid reason for supporting a browser that is virtually extinct...
2. What is the problem?
"The bar ... refuses to behave"
You might as well be saying, "it doesn't work". How doesn't it work? What is the expected behavior, and how is the actual result deviating from your expectation? You shouldn't expect us to download a browser that hardly anybody has used for over a decade to confirm an ambiguous bug description (SSCCE).
3. Your HTML is funky
No formatting The lack of indentation isn't a technical concern (only a nitpick), but makes it hard to read
Inconsistent use of quotes The general practice is to use double quotes " for HTML attributes. For example: <div id="floating_bar">.
**Is that ! supposed to be there in the <script/> tag?
<g:plusone/> is not a valid HTML tag. Were you trying to do something like this?
The CSS is probably not working because the bottom property is set as a percentage. Support for bottom/right was pretty spotty at first, and percentage might be iffy.

Related

CSS works in Safari in local, but does not work in Safari after I upload the code to cPanel

I have uploaded all the files to my web server (I use NameCheap, cPanel).
This is my webpage: www.gloriachen.me
In the landing page, my html and css are:
<!-- Landing Page -->
<div class="container-fluid">
<img src="assets/landing-page.JPG" class="img-fluid" alt="Responsive image" style="width:100%;">
<div class="top-left">
<p> <span>Hi, </span>I am Gloria Chen. I am currently a recent graduate from Australian National University (ANU)
with a master’s degree in computer science. As an enthusiastic fan of front-end development
at the moment, I am keen to look for a job on Web/App front-end development.
</p>
<p> This is my personal blog website. Initially I developed this site for practicing my
front-end skills, especially in programming. I used HTML, CSS, BootStrap 4, JavaScript
as the main languages for building my site, and would like to use Vue.js or Angular.js
for front-end framework building.
</p>
<p> It’s not easy for me to look for jobs right now at the moment, one reason is because
I just finished a surgery of a chest wall tumour removal on this September. For almost
about one and a half month, I was in the process of recovering from the treatment and
procedure. Luckily, my pathology report of the removed tumour is positive, which means
I can still be alive :). I thank God for his preserving. But now I really need to gradually
restore my mind, emotion, will and motivation, and really devote myself into working again.
</p>
<p> Things are not always easy, but I believe I will get a suitable one soon :) </p>
</div>
</div>
/* Text CSS */
.container {
position: relative;
text-align: center;
color: white;
}
.top-left{
width: 50%;
position: absolute;
top: 150px;
left: 70px;
line-height: 2;
}
The text is supposed to be on the top of the image. I tried on my local, and it was successful, like this:
After I upload all my files to the NameCheap cPanel. However, it doesn't work in Safari. If I open the site using Safari, the text won't be on the top of the image. The landing page would be like this:
Anyone knows what is the reason of it and how can I solve the problem here?
Thanks in advance!
It looks correct for me when clicking your click.
Try clearing your browser cache, or holding Shift while clicking the refresh button to perform a hard-refresh, which should force new css to load.
Check the path to your CSS file. your path to the CSS file might not be correct.

Google fonts — partial rendering in Google Chrome

I use Google Open Sans font (https://fonts.google.com/specimen/Open+Sans) with cyrillic. And if I have stressed word ( ́ — accent symbol is missing in font-set), Google Chrome renders only the part after accent. But another browsers haven't same problem.
Rendering comparison:
I understand that every browser has own render-engine, but I very want to solve or avoid this trouble. What should I do?
.open-sans-font {
font-family: "Open Sans";
}
<link href="https://fonts.googleapis.com/css?family=Open+Sans:400,400i,700&subset=cyrillic" rel="stylesheet">
<div class="open-sans-font">
<p> філігра́нний — несамови́тий </p>
<p> філігранний — несамовитий </p>
</div>
I simply added “text=...чшщьюя́” to my Google Web Fonts API request.
<link href="https://fonts.googleapis.com/css?family=Open+Sans:400,400i,700&text=АБВГҐДЕЄЖЗИІЇЙКЛМНОПРСТУФХЦЧШЩЬЮЯабвгґдеєжзиіїйклмнопрстуфхцчшщьюя́" rel="stylesheet">
It turns out that the accent symbol belonged to latin-ext charset
Taking it as you want to make sure the width is the same for that line. I would ass a class to that <p> for example
<p class="RenderTrouble">філігра́нний — несамови́тий</p>
And in your css put
.RenderTrouble {
max-width: 200px; /* Or how ever many pixels it is long */
}
And that should do it. the only problem is finding how many pixels long the edge render is.
I'll do the math;
1398 -19 = 1379
The length of the sentence is 1379px so make the css
.RenderTrouble {
max-width: 1379px; /* Or how ever many pixels it is long */
}
Well in theory anyway. it isn't working for me so I'm afraid you're out of luck. I will keep trying to see if I can get it
I give up here
<img src="./Untitled.png" style="max-width: 210px; height: 120;">

Page renders differently on refresh within same browser

I have an unusual problem that's driving me crazy! I haven't found a question posted yet that pertains to this exact issue.
I have a page on my site where certain elements render incorrectly on random page loads. Using chrome for example, the page will render normally but after a number of refreshes a basic ul in the header will shift down into the body. Sometimes a carousel won't appear, or a navigation block will slide to the next row. I have duplicated this behavior on Firefox as well.
I can't really give a snippet of code for anyone to look at because I have no idea where the issue is originating from. The page with the issue is the index of www.Calibrus.com.
What's really amazing is that by using Chrome Dev Tools I can set display:none to the incorrect ul, then set display back to normal, and the ul renders where it should again. This suggests to me that the exact same html and css is somehow rendering differently (regardless of any scripts being used).
Also, this isn't an issue with the server. I have the same problem when running the code locally.
Does anyone have any idea whats going on here?
I believe the issue is tied to floats and the slideshow javascript.
Whenever I triggered the layout bug on the live site, it was accompanied by the first slide not rendering correctly. This would cause <div id="r1"> to have a height of 0 which in turn seems to aggravate the afore mentioned float bug. There seems to be some tension between the <ul> which is floated and the <a> which is not.
This is the solution that worked for me:
In index.html add a class (or ID if you prefer) to allow yourself to target the link within the CSS. In this example I have simply given it a class of logo:
<a class="logo" href="index.html">
<img src="images/Calibrus_logo.png" alt="logo" border="0">
</a>
Then, in your CSS:
// target the link using your chosen selector
.logo {
display: block;
float: left;
}
Once I added those rules, I could no longer replicate the rendering bug.
Side note:
I would recommend declaring your character encoding just after the opening <head> tag with <meta charset="utf-8">.
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Calibrus</title>
Also, the border attribute for images has become obsolete. So rather than:
<img src="images/Calibrus_logo.png" alt="logo" border="0">
Simply target the <img> with CSS and declare:
.logo img {
border: none;
}

Legitimately hide/prevent Rich Snippet html from rendering on screen - is this OK to do?

I am using rich snippets on my site, I have all of the code for them in the footer so that they are centrally located and easy to access. I do not want the text around these snippets rendered on the page because that info is elsewhere on the site. Is it ok to hide this text by using style="display:none" or will Google ignore the rich snippet entirely because the fields are hidden?
<!-- start rich snippet code -->
<div itemscope itemtype="http://schema.org/LocalBusiness">
<span itemprop="name" style="display:none">My Business Name</span>
<div itemprop="address" itemscope itemtype="http://schema.org/PostalAddress">
<span itemprop="streetAddress" style="display:none">123 Example Street, Suite 456</span>
<span itemprop="addressLocality" style="display:none">Major City</span>
<span itemprop="addressRegion" style="display:none">NY</span>
<span itemprop="postalCode" style="display:none">12345</span>
<span itemprop="addressCountry" style="display:none">US</span>
</div>
<span itemprop="telephone" style="display:none">(123) 456-7890</span>
<a itemprop="URL" style="display:none">http://www.mycompanysite.com/</a>
</div>
<!-- end rich snippet code -->
Any info would be much appreciated! Thanks in advance!
As #Diodeus said, ideally you'd have these rich snippets on the actual info that is shown to the user elsewhere on the site. Duplicating it is usually unnecessary.
Yes, Google may well ignore this content based on the display:nones. Can I ask why you're setting it on each element rather than just once on the highest level div?
A way around the display:none potential SEO issue would be to hide it in a different way. For example give the parent div a class of .visuallyhidden and add this to your stylesheet:
.visuallyhidden {
border: 0;
clip: rect(0 0 0 0);
height: 1px;
margin: -1px;
overflow: hidden;
padding: 0;
position: absolute;
width: 1px;
}
I would like to mention that Google tries heavily (using combination of algorithmic and manual things) to find websites which illegitimately use hidden text.
The typical penalty for that would be a removal from index for 30 days. However, you should not be concerned if you use hidden fields legitimate ways.
There is a very nice article Eric Enge Interviews Google's Matt Cutts regarding Google attitude toward illegitimately use of hidden text.
Have a look at this: https://sites.google.com/site/webmasterhelpforum/en/faq-rich-snippets and search for the word 'tempting'.
' It can be tempting to add all the content relevant for a rich snippet
in one place on the page, mark it up, and then hide the entire block
of text using CSS or other techniques. Don't do this! Mark up the
content where it already exists. Except in special circumstances ... '
It might seem like a clever idea to hide elements in a more complex way than by just display:none but, and i guess the same can be applied for hidden honeypot form fields, you are not the only one who can think of that.
Note: It is as easy to determine if a field is hidden by display:none as it is by margin:0; padding:0; width:1px; height:1px; overflow:hidden or by position:absolute; top:-[a value bigger than the page height]px or by something similar.
People would rich-snippet everything as an Apple product page if it would be ok to hide the snippet and provide any other kind of information on the porn - i mean page.
You got all that information already hanging out on the site, so just add the correct microdata tags to the corresponding text passages and google (other search engines, too by the way) will be happy.
So, for example, if your main page title already exists, put the itemprop="description" tag in the <div> tag thats is wrapping the title and you should be fine.
:)

Name for a menu bar that stays as you browse?

I read a while ago there is a specific name for this. Let's say i'm on mysite.com, and I click on www.google.com, and when I get to google.com, there's a big MYSITE.com bar at the top, which easily allows me to go back to MYSITE.com. What is this called, and is there a plugin for this in Drupal?
You may be referring to HTML frames?
http://www.w3schools.com/html/html_frames.asp
These usually perform badly with browser back-forward buttons though.
Don't use frames! They're ugly, will confuse the users, and we're not in 1995 anymore ;)
What you're looking for is CSS fixed menus
http://www.w3.org/Style/Examples/007/menus.en.html
I never used Drupal, but I found that with a bit of googling: http://drupal.org/node/769848
Google don't named it in their press release. A few days ago Google get rid of the black bar.
Drupal has at least two such modules:
Simple menu
Administration menu
As I can see, above replies doesn't answer what you asked. Correct me if I'm wrong.
You are looking for a way to add an iframe toolbar just like about.com or images.google.com does.
You can do this with a raw HTML page that doesn't bootsrap Drupal at all.
You will find External Links module useful if you are willing to create a module.
See http://www.amirharel.com/2009/07/28/implementing-iframe-toolbar/ for HTML stuff.
Frame Google just because you think your users will search from there is not a good option, if that's what you are trying to do. That way you could think about framing Facebook and other valuable sites, but trust me, people don't like frames (I just hate them all!)
What you should do is to create a custom search engine for your site, and this is a valuable functionality from Google Search Engine to your users finding stuff on your site (only indexed pages).
If you are interested visit http://www.google.com/cse/
It's definitely done with frames. Here is the relevant code from a Google Translation :
<frameset rows="65,*" frameborder="1" framespacing="0" cols="*">
<frame src="/translate_n?act=url&hl=en&ie=UTF8&prev=_t&sl=auto&tl=en&u=http://lamaisonducinema.com/" name="n" scrolling="no" noresize="" marginwidth="0" marginheight="0">
<frame src="/translate_p?act=url&hl=en&ie=UTF8&prev=_t&sl=auto&tl=en&u=http://lamaisonducinema.com/&usg=ALkJrhgchorYUw9YujsX2PFQ6ZZSxH4A1A" name="c">
<noframes><script><!--document.location="/translate_p?act=url&amp;hl=en&amp;ie=UTF8&amp;prev=_t&amp;sl=auto&amp;tl=en&amp;u=http://lamaisonducinema.com/&amp;usg=ALkJrhgchorYUw9YujsX2PFQ6ZZSxH4A1A";--></script><a href="/translate_p?act=url&amp;hl=en&amp;ie=UTF8&amp;prev=_t&amp;sl=auto&amp;tl=en&amp;u=http://lamaisonducinema.com/&amp;usg=ALkJrhgchorYUw9YujsX2PFQ6ZZSxH4A1A">Translate</a></noframes>
<object style="padding: 0px !important;margin: 0px !important;background: transparent !important;position: fixed !important;border: none !important;-webkit-box-shadow: none !important;top: -100px !important;left: -100px !important;display: block !important;width: 1px !important;visibility: hidden !important;height: 1px !important;" data="safari-extension://com.interclue.ultimatestatusbar-725998GKSY/f41e051d/fixUninitalizedPage.html"></object>
</frameset>
For Drupal 6, it seems the Modal Frame module might do the trick : http://drupal.org/project/modalframe.
They are called fixed menus. Do not use frames.
HTML:
<header><p>I'm always at the top</p></header>
<article>
<p>blah</p>
<p>blah</p>
<p>blah</p>
<p>...</p>
</article>
CSS:
header { position: fixed; top: 0; left: 0; width: 100%; }

Resources