Inline-block not working on iPad - ipad

I built a grid layout using a Codrops tutorial and my own knowledge. The grid is setup using display:inline-block; and nth-child to remove padding from the last element so they do not break to the next line. As the grid size changes, I use a different nth-child in the media query to remove padding from the last element, whether it be the 3rd element, 2nd element, or the 1st.
Everything works swell in all desktop browsers, but does not work on iPad.
For some reason on iPad, the grid is breaking in the wrong place, which looks awful.
I don't know where to begin to test this bug because it works fine when scaling the browser window down. I've tried some testing with iOS simulator to no avail. However, what is interesting, is on the initial page load the grid works fine, then once fully loaded, the grid breaks.
You can view the problem here (on iPad): http://www.eugeniacameronfoster.com/new/paintings/
Thanks!

There are a few issues that a CSS Tricks article points out.
Basically you need to remove the space between the divs in your grid, so that instead of
<ul>
<li>one</li>
<li>two</li>
<li>three</li>
</ul>
you need to put
<ul>
<li>
one</li><li>
two</li><li>
three</li>
</ul>
I will put in a vote for you to just bail on the inline-block idea and go with flexbox or box-sizing: border-box;

There's a workaround that doesn't require to change the html markup.
Using a negative letter-spacing of -0.31em on the parent ul and then resetting the letter-spacing in the li the space between the lis disappear.
ul {
letter-spacing: -0.31em;
}
li {
letter-spacing: normal;
display: inline-block;
}
An example can be seen here: http://jsfiddle.net/c67U4/
This trick is used in particular in PureCSS grids that use inline-block instead of floating elements.

Related

AjaxFileUpload control's Drop zone not visible on IE10

I have Ajax file upload control on an aspx page. The drag and drop zone of the control is visible on Chrome and mozilla but not on IE10. I understand that it should be visible on browsers which support HTML5 and CSS3. I believe IE10 has the support.
I went through the CSS and found this difference
<div class="ajax__fileupload_dropzone" id="ctl00_Mainform_AjaxFileUpload_Html5DropZone" style="width: 100%; height: 60px; visibility: visible;">Drop files here</div> (In Chrome)
<div class="ajax__fileupload_dropzone" id="ctl00_Mainform_AjaxFileUpload_Html5DropZone" style="width: 100%; height: 60px; display: none; visibility: hidden;"/> (In IE10)
In case of IE10, The display is set to none and visibility to hidden.
My question specifically is
At what point is this browser specific css rendered? so that I could get to why this is happening even when there is support for HTML5 and CSS3
I believe I cannot change this property in my code as it would be overwritten again in case of IE10.
EDIT:
I did try to edit the css by setting display to "block" and visibility to "visible". But this creates a disproportionate view with scroll bars which is not an ideal solution in my case
catch it with jquery.
// let the dropzone load first
setTimeout(function () {
$('.ajax__fileupload_dropzone').text('Drag Drop/Click');
if ($.browser.msie) {
$('.ajax__fileupload_dropzone').css({'visibility': 'visible','display':''});
}
}, 10);
this got it to show but it would not work right. I updated the toolkit from 15.1.2.0 to 15.1.3.0 and this seems to fix the problem. The odd thing is the night before I had no problems with IE.

Whitespace in IE10 on Windows 8 when highcharts-container overflow is visible

I'm using the technique specified at the end of this thread: Highcharts tooltip overflow is hidden to allow tooltips to flow outside the highcharts-container.
Everything is fine except when viewed in IE10 on Windows 8.
A large amount of white space is displayed underneath the chart when .highcharts-container {overflow : visible} is set.
Here's a demo of the problem:
http://jsfiddle.net/Bp4zG/6/
You need to view the demo in IE10 on Windows 8 to see it.
Is there another way to flow tooltips outside the container? Or a way to remove the mystery whitespace?
This is a problem for my app as it manifests in a very wide page with a horizontal scrollbar which in turn messes with some scrollTo js functions I have.
Managed to fix it by wrapping everything in a div with overflow: hidden
html
<div class="wrapper">
<div id="container" style="height: 300; width:100%"></div>
</div>
CSS
.highcharts-container {overflow: visible !important; }
.wrapper {overflow: hidden;} /* the fix! */
See fix here: http://jsfiddle.net/Bp4zG/8/

z-index not properly rendered on iPad and Google Chrome 22

I have attached two pictures, the first shows the "desktop" of the webapp I work on, some of the icons you see open dialogs made of a <div/> containing an <iframe/>, but while on a normal pc it all works properly, on the iPad it seems there is a problem with the z-index of some elements, as shown in second picture.
The small red rounds with number inside are defined as follows:
.countComunicazioni {
position: relative;
background: url(/images/admin/menu_sgs/counter.gif) no-repeat center center;
height: 35px;
width: 35px;
color: #FFF;
top: -105px;
left: 120px;
z-index: 0;
font-weight: bold;
display: none;
}
.countComunicazioni p {
margin-top: -5px;
padding-top: 10px;
}
The markup is a <div class="countComunicazioni"/> tag and a <p/> tag inside.
I also noticed that now the problem also appears in Google Chrome V22, the numbers in red circles are always on top even if they have z-index == 0 and the dialogs have z-index > 1000.
As per this bug report ( http://code.google.com/p/chromium/issues/detail?id=144518 ), the change seems to be intended, even if I would bet it'll broke many layouts, not only ours.
This problem was not present in previous versions of Google Chrome, nor is present on Firefox V15 or Internet Explorer V9, where everything is rendered problem.
How can this problem be solved? I'm no CSS expert, so I must admit I have tried little, if anything, so far... And also, who is "right" here? Is our markup incorrect, or does the problem lie in google chrome new rendering strategy?
EDIT
It seems I've been able to solve the issue shown in the two pics: all the dialogs generated from my web app are placed inside a <div/> with position:fixed placed on the very top of the body, now I tried to move the div to the very bottom of the page, and the layout seems now correct.
There is one more problem though: when opening a modal dialog, the opaque layer that is supposed to be created between the dialog and the below content, is actually created above it, see new screenshot.
How could this problem be solved? Does it require modifying our javascript or is it an issue with jquery ui itself?
Just found out myself that the way that chrome 22+ handles z-index has been altered.
Check out this awesome explanation here that I didn't write here...
http://updates.html5rocks.com/2012/09/Stacking-Changes-Coming-to-position-fixed-elements
Basically the way I understand it is that elements which have
position: fixed
now get counted with their own z-index layer so you'll have to adjust your pages accordingly to suit.
Hope that helps!

Sprite being rendered incorrectly

I have a page with a button with a background image (sprite). When I do not put my sprite in a table, I get repeated images scattered diagonally across the web browser, and no gallery. In HTML source view, everything looks fine, but if I go to the Inspector, it looks different, repeating buttons that I created diagonally from right to left going down.
Update:
I just realized that another way to get this working was to change:
<a href="../Gallery/Create" class="l_new" />
to
<a href="../Gallery/Create" class="l_new" ></a>
This is no hardship. The only thing I can think of is this must be some bug in my version of #renderbody used with _layout.chtml (I'm using the one generated by visual studio).
Looks like this is going to continue being a mystery but I'll keep my question posted, just in case.
The l_new style contains sprite info:
.l_new
{
width: 170px;
height: 36px;
background-position: -43px -155px;
background-image: url('img/sprites.png?v=6');
background-repeat: no-repeat;
overflow: hidden;
display:block;
}
I could not find anything unusual about the HTML, except the fact that it is in a section tag which I've never used before, and I do not see any javascripts running.
If I enclose the sprite in a table, everything is normal.
Here is what it looks like with Chrome's inspector. It does the same thing in IE9. I have not posted the HTML source, but believe me it's totally normal, and does not reflect the output below.
And here is an example of the index.chtml file which results in the issue:
#model List<AutoShow_MVC.Models.GalleryModel>
#using AutoShow_MVC.Models
#{
ViewBag.Title = "Index";
}
<h2>Photo Gallery</h2>
<a href="../Gallery/Create" class="l_new" />

Jquery UI breaks layout in ie7 & 8

I developed a good site layout which works like a charm in Webkit and FF based browsers... but in IE 7 and 8 everything get broken up like.
I've never seen so much difference between Safari/Chorme and IE. I tried different DOCTYPEs but there was no difference.
If I remove all the jquery css everything works fine.
You can see it working on [removed]
Can anyone hint me on how to solve this mess?
You have a compatibility issues, I think you need to override the ui-state-default and .ui-state-hover classes on the buyitui.css file to fit IE.
You can use firebug in firefox to go throught the css files.
To overide the css, create one css file and put all the overrides on this file and place it on the bottom of all the css files. Assuming you make sure you are not using inline style sheet.
EDIT:
You need to override this three:
<div class="clear"/>
<div class="separator" style="width: 950px; margin-left: auto; margin-right: auto; float: right;"/>
<div id="pie" style="float: right;">
The Problem seems on the clear class you have above the separator. When you do clear both, all the floating is cleared and the separator is getting up of the page with the height exanding almost all over the page.
Try to change this and you will see the changes:
This could not be the exact solution, but it really points out the problem on your pages.
on the clear class
remove the clear:both; or make it clear:none;
on the separator class
add float:right and margin-right:200px;
on the pie id
add float:right; and margin-right:200px;
the jquery accordion was what was breaking everything, regeneratd and problem solved (just the regular no standars on IE)

Resources