For some reason, my website (find-minecraft-servers.com) sometimes displays oddly in Internet Explorer. The number underneath Servers Listed in the green-ish banner sometimes fails to show altogether, like the image below, however when I check the source the number is in there, so it's not an error server-side.
This error is only occasional and appears on IE10. The site is using the Bootstrap framework. Here is the code for the Servers Listed and other statistics elements:
<div class="banner">
<div class="container" style="background: transparent;">
<div class="row">
<div class="col-sm-4 text-center whiteborder">
<h1>
<?php
// connect to mysql
require('includes/mysql.php');
$totalplayers = mysql_fetch_assoc(mysql_query("SELECT SUM(players) FROM servers WHERE suspended=0"));
echo number_format($totalplayers['SUM(players)']);
?>
</h1>
<h3>PLAYERS ONLINE</h3>
</div>
<div class="col-sm-4 text-center whiteborder">
<h1>
<?php $totalservers = "SELECT * FROM servers WHERE verified=1 AND enabled=1 AND suspended=0"; echo number_format(mysql_num_rows(mysql_query($totalservers)));?>
</h1>
<h3>SERVERS LISTED</h3>
</div>
<div class="col-sm-4 text-center whiteborder">
<h1>
<?php echo number_format(mysql_num_rows(mysql_query("SELECT * FROM votes")));?>
</h1>
<h3>TOTAL VOTES</h3>
</div>
</div>
<br />
</div>
</div>
Well seeing as the div that accompanies the <h1> also accompanies the <h3>, and you say that the h3 consistently displays; I'd hazard a guess and say that the problem lies exclusively with the CSS associated exclusively with the h1.
The only CSS that is directly associated with the h1 is
h1{margin:.67em 0;font-size:2em}
Now there isn't anything obviously wrong with this (and it validates fine) though is it possible that that 0 is triggering some strange quirk with IE?
Sticking the page through an IE6 emulator results in this:
Clearly broken - BUT the server number still displays.
FWIW font-size has been supported since IE 5.5.
So in summation: it is probably just you. If it isn't it is probably because some detail concerning the css (possibly that "0") has made IE go into a panic concerning the isolated set of rules, and do the equivalent of display:none. It is possible that there is some additional rule in your CSS doing odd things (the code isn't exactly setup well for maintainability). But I would say that that is unlikely.
Related
When I uploaded the html & css parts into webhost, on my browser (Google Chrome) didn't show all of the page, so I deleted cache, media, everything.
Tried to enter again on the website, still wasn't loaded all of the page.
I enter to website by Mozilla, page was there, full loaded.
Asked my friend to enter by chrome to my website, page was full loaded
I tried to enter again by chrome to website, page wasn't full loaded.
Restarted my pc, tried again, page wasn't full loaded.
But why?
That's how only I see from Chrome
That's how everybody sees even if it's from Chrome or another browser
Missing code :
<div class="banner">
<div class="container">
<div class="banner-main">
<div class="col-md-6 banner-left">
<img src="images/ba.png" alt="" class="img-responsive">
</div>
<div class="col-md-4 blc-layer3-grids-3 simpleCart_shelfItem">
<span class="bann-heart"></span>
<h2>OFERTA SPECIALA ! </h2>
<hr> <br>
<h1>Reducere MAJORÄ‚ LA <font style="color:red">UNIVERSAL GAIN FAST !</font></h1>
<hr>
<h2 class="item_price"><strike>$200.00</strike></h5>
<h2 class="item_price"><strong>$100.00</strong></h5>
</div>
<div class="clearfix"> </div>
</div>
</div>
</div>
I had some similar issue but then i realised that was due to cache.
How i found was, i re-uoloaded the file to another directory and everything worked fine. Sometimes chrome is a bad guy with cache issue.
Probably try deleting cache again or reload the page with shift pressed several times.
I'm trying to publish a piece of html to umbraco.
I managed to setup tinymce to accept all the html tags, however, there is still some wrong transformations being done.
When I publish this piece of html:
<div class="col-md-4">
<a href="" class="card-link">
<div class="panel panel-default">
<div class="panel-body">
<h2 class="card-link-title">Currencies</h2>
<i class="card-link-icon icon icon-money-currencies"></i>
</div>
</div>
</a>
</div>
It is transformed to:
<div class="col-md-4">
<div class="panel panel-default">
<div class="panel-body">
<h2 class="card-link-title">Currencies</h2>
<i class="card-link-icon icon icon-money-currencies"></i>
</div>
</div>
</div>
The a tag is removed. According to new html5 standards, div under a tag is valid (http://w3c.github.io/html-reference/a.html#a-changes), so I'm wondering if there's a way to make tinymce in umbraco accept the piece of html as it is
You need to edit the javascript in umbraco/lib/tinymce/tinymce.min.js. (The file mentioned by Jannik Anker in the other answer is a legacy version of tinymce, no longer used)
Look for a line
n("a","href target rel media hreflang type",u)
and try amending it to
n("a","href target rel media hreflang type",u,"div")
Make sure to clear your browser cache after editing so the updated file is used.
A quick look inside /umbraco_client/tinymce3/tiny_mce_src.js reveals a function named getHTML5() where these rules seem to be defined. In my 7.4.0 test site I'd change line 2507 to
'a[A|href|target|ping|rel|media|type][B][div]' +
BUT that's not really doing anything, even if you make the same change in /umbraco_client/tinymce3/tiny_mce.js, because the RTE editor is using a different JS entirely, namely /umbraco/lib/tinymce/tinymce.min.js in which I cannot find that same function :-s
I don't have time for much further investigation, but maybe this can get you a little bit further?
Ok I'm trying to debug my layout and see why it's all funky in IE8 and below.. well when I start observing the code, I realize all the wrapping elements of inner elements are self closing themselves.
<section id="top-bar"/>
<div class="container">
<div class="row">
<div class="span12">
<p>ELEMENTS</p>
</div>
</div>
</div>
<div class="rivets"/>
</section/>
Well I have styling applied to the #top-bar in my CSS:
#top-bar {
background: #146c7e url('../images/top-bar-bg.png') repeat top left;
color: #fff;
}
So in IE8 and below that style is not being applied. This is absolutely frustrating. This only happens to me in Magento.. All my other layouts I did on my own never self closed themselves if content wasn't directly inside of them.
Ok people thought I was self adding those ending tags, but here is my code:
<section id="top-bar">
<div class="container">
<div class="row">
<div class="span7">
Shoppe
Local
Half Baked
</div>
<div class="span5 mag-links">
<?php echo $this->getChildHtml('topLinks') ?>
</div>
</div>
</div>
<div class="rivets"></div>
</section>
IE8 is adding those tags AUTOMATICALLY. I can't delete them.. hence the code works great in Chrome, Firefox, IE9 and up.. But IE8 and below, it starts that self-closing stuff. I NEVER had this problem before.
I think this is happening because IE8 does not support HTML5 tags, like section. If you want to get this to work in IE8, call the following in the head of your document:
<!--[if lt IE 9]>
<script>
document.createElement('header');
document.createElement('nav');
document.createElement('section');
document.createElement('article');
document.createElement('aside');
document.createElement('footer');
document.createElement('hgroup');
</script>
<![endif]-->
This tells IE8 to create these elements, and it should be able to recognize them as HTML elements afterwards.
I know you have marked the correct answer in this specific case but this may help others:
When I have these issues I open the page in Firefox, click 'View page source' and then inspect this for any red elements. This shows any code which is not closed properly (usually a missing </div>) and points out where it has tried to fix it for you.
Modern browsers try and close incorrect code automatically which can be annoying, as you only realise something is up when a client points it out in an old version of IE!
Hopefully this helps someone else who thinks their problem is similar.
Your #top-bar element doesn't contain the other elements, so you can't see a background of an element that doesn't have any size.
Change this:
<section id="top-bar"/>
to:
<section id="top-bar">
I'm using context to print blocks into a region. However, I'd like to have the region print wrapper DIVs around the blocks of the given area. I know this is possible with region.tpl.php in Drupal 7. I can't seem to figure out the best way in Drupal 6.
<div class="{region classes i.e. sidebarleft}">
<div class="{block 1}"></div>
<div class="{block 2}"></div>
<div class="{block 3}"></div>
<div class="{block 4}"></div>
</div>
However, currently it prints like this:
<a id="context-block-region-right" class="context-block-region">Right Sidebar</a>
// the previous anchor tags is hidden
<div id="block-block-82" class="clear-block block block-block">
<h2>Community Navigation Block</h2>
<div class="content">
<div id="community-landing-navigation-menu">
<div class="joinCommunityBox">
<div class="community-landing-pagePanelWrapperSideBar">
<div class="community-landing-pagePanelWrapperSideBar">
<a id="context-block-block-82" class="context-block editable edit-community_contexts"></a>
</div>
</div>
I wish it would print a region wrapper tag around ALL of that...
Also, I want to keep my page.tpl.php clean of extra wrapper tags. It would be better if we could preprocess regions to print a wrapper tag.
I figured it out... The answer is actually borrowed from zen. If you click the link below, several 'preprocess functions' are rendering a new region template. Then, blocks are collected into that region, and printed.
http://www.drupal.org/node/223440#comment-5304866
It works great, and is going to go production soon.
I am using the DNN MobiNuke Module (v02.00.03) from DataQuadrant to create a mobile version of a website I have created. Everything is going well EXCEPT a weird issue I am running into with the Mobile Skins. I have a simple Mobile Skin that looks like this:
<div id="mobile_frame">
<div id="mobile_header">
...
...
</div>
<div id="main_wrap">
<div id="mobile_main" class="sub">
<div id="ContentPane" runat="server"></div>
</div>
</div>
<div id="mobile_footer">
...
...
</div>
</div>
The issue that is arising is that ANY content in the ContentPane that has an empty div tag will change itself when rendered in a mobile browser:
<div class="xxxx"></div>
Will change itself to
<div class="xxxx" />
The biggest problem that this is causing is that the browser is interpreting the tag as an opening div tag with no closing tag. Therefore it is placing an ending div tag essentially wherever it wants. It's causing ALL of the markup after this area to get very messed up.
Here is an example of the code as it should be, and how it is rendering on the page:
Should be:
<div id="main_wrap">
<div id="mobile_main" class="sub">
... Content Here ...
</div>
</div>
<div id="mobile_footer">
...
</div>
</div>
But it renders as:
<div id="main_wrap">
<div id="mobile_main" class="sub">
... Content Here ...
</div>
<div id="mobile_footer">
...
</div>
</div>
</div>
I can fix this in the markup that I have control of by putting inside of the tags, but I do not have the time/energy to go through EVERY module that might be showing up in the ContentPane to check for empty tags. In addition, there are places where I want an empty tag to fill it with content later with javascript.
Lastly, I did a TON of research to look this up and I cannot find a thing. The closest that I found is that this happens in XSLT when transforming some XML, but as far as I know MobiNuke is not doing that.
Any help is greatly appreciated. Thanks!
I have figured out the issue after having a discussion with the vendor. There is a setting in the module settings called "Enable content adaptation". Apparently the setting will try to make the HTML to be XHTML compliant, but it was definitely not working for me. Hope this helps anyone else seeing this.