I am having a very slow menu drop down experience on windows mobile only. it works ok on chrome and android pc's etc.
image of drop down, GREEN sub menu is very very slow to apper on windows mobile phones (only) you have to keep the logon pressed for at least 1.5 secs before sub menu appears. I would be grateful if somebody could look at the CSS code an see if I need to add / alter any of the settings in CSS
small piece of my nav code
<nav>
<ul id="main-nav" class="clearfix">
<li> Log in
<ul>
<li> Members area </li>
<li> Rythe Centre </li>
<li> Members Email IT Support</li>
</ul>
</li>
</nav>
#main-nav a {
font-size: 100%;
padding: 6px 5px 3px 3px;
margin: 0px;
}
#main-nav a:hover {
padding-right:20px;
}
#main-nav ul a {
padding: 6px;
height: 10px;
width: auto;
height: auto;
line-height: 1;
display: block;
white-space: nowrap;
float: none;
text-transform: none;
font-size: 100%;
background: #090;
}
#main-nav ul a:hover {
background: #000;
}
#main-nav ul ul li:first-child a:after {
position:absolute;
left: -8px;
}
#main-nav ul ul {
top: 0;
left: 90px;
}
#main-nav ul a {
width: auto;
}
#main-nav ul ul a {
background: #f90;
I eventually found the solution, in this post
4 novel ways to deal with sticky :hover effects on mobile devices..
http://www.javascriptkit.com/dhtmltutors/sticky-hover-issue-solutions.shtml
emphasized textCSS's venerable :hover pseudo class forms the backbone of many CSS effects, triggered when the mouse rolls over an element on the page. In today's changing landscape however where touch screen inputs share center stage with the mouse, this has presented a bit of a conundrum for webmasters. Touch based devices in an effort to not be left out in the cold with such a pervasive CSS feature do respond to hover, but in the only way that's possible for them, on "tap" versus an actual "hover". While this is overall a good thing, it leads to what's known as the "sticky hover" issue on these devices, where the :hover style stays with the element the user just tapped on until he/she taps again elsewhere in the document, or in some circumstances, reloads the page before the effect is dismissed.
I have used Method 4- Dynamically add or remove a "can-touch" class based on current user input type.
Good luck.
Mark
Related
QUESTION:
Using the Gamepad API, i am having a problem when re-sizing the window; namely, a finite padding-bottom appears between the bottom of the #gameBoard and the bottom edge of the Browser window -- which I do not want:
Please note that I have tried a Sticky Footer which depends on position: absolute; which I would prefer to avoid.
EG,
with a padding-bottom > 0
I am looking for this with each window re-size:
padding-bottom = 0
HTML:
<div id="gameEnclosure">
<div id="header">
stuff here
</div>
<div id="gameBoard">
<canvas id="game">
game piece img's here
</canvas>
</div>
</div> <!-- gameEnclosure -->
CSS
/* COMMON RESET */
html, body {
margin: 0px;
padding: 0px;
width: 100%;
height: 100%;
}
body {
background-color: blue;
}
#gameBoard {
display: block;
position: relative;
width: 100%;
height: auto;
background-color: #fff;
background-image: url("../images/room.gif");
background-size: cover;
}
As already stated, I have tried using a Sticky Footer and I just do not like using position: absolute. Also, the individual game piece images do not maintain their proper aspect ratio with window re-sizing = another no-no.
JS
function doBodyOnResize() {
let gameHeight = $('#gameBoard').outerHeight();
$('body').css('padding-bottom', gameHeight);
$('#gameBoard').css('height', gameHeight);
}
This is the onresize function I used to have with the Sticky Footer.
Without a Sticky Footer, game pieces zoom in and zoom out just great -- if I could just get keep padding-bottom = 0 upon window resizing.
I'm fairly new with SASS and I am wondering what is the best method for styling two different top-bars with different styles. What is the best practice using SASS? This question really applies to styling unique instances of anything from the built-in Foundation _settings.scss sheet. I have uncommented and made changes to certain items, and that works just fine as long as you want all instances of that component to be uniform, but when there are two uniquely styled versions of a single component, what should I do?
Agreed (…with your comment. Have an upvote!)
It's difficult to ferret out this kind of information, and that might really be because it's somewhat difficult to do. Not impossible, but not easy.
Global SASS/SCSS changes are just that: global. So while it's easy enough to change the .top-bar styles globally in _settings.scss, overriding individual element instances have proven tricky. Two .top-bars styled independently is tricky, and not to be accomplished using the global variable solutions.
The obvious, and purely CSS, way is to add an ID to each menu (I don't like IDs, but they fit the bill in this instance because of their near-indestructable specificity), and then you should be able to style each menu by simply making each rule specific enough to override the base .top-bar styles. I am in the process of doing this exact thing. So far, so good.
Here's my SCSS:
/* ==================
Page Head Styles
================== */
#utility-nav {
display: block;
width: 100%;
top:0;
width: 100%;
.top-bar.utility {
background-color: white;
margin: 0;
height: 29px;
a {
line-height: 29px;
height:29px;
padding: 0 auto;
color: #777;
background-color: white;
font-size: 14px;
&:hover {
color: #777;
background-color: #f2f2f2;
}
}
}
.top-bar-section {
max-width: 1170px;
margin: auto;
}
}
Which renders to this CSS:
#utility-nav {
display: block;
width: 100%;
top: 0;
width: 100%; }
#utility-nav .top-bar.utility {
background-color: white;
margin: 0;
height: 29px; }
#utility-nav .top-bar.utility a {
line-height: 29px;
height: 29px;
padding: 0 auto;
color: #777;
background-color: white;
font-size: 14px; }
#utility-nav .top-bar.utility a:hover {
color: #777;
background-color: #f2f2f2; }
#utility-nav .top-bar-section {
max-width: 1170px;
margin: auto; }
And here's the HTML it's attaching to:
<!--
Top Utility Menu
-->
<div id="utility-nav">
<nav class="top-bar utility show-for-large-up" data-topbar role="navigation">
<ul class="title-area">
<li class="name"></li>
<li class="toggle-topbar menu-icon"><span>Menu</span></li>
</ul>
<section class="top-bar-section">
<!-- Right Nav Section -->
<ul class="right">
<li>Careers</li>
<li>Contact Us</li>
<li>Blog</li>
<li>Sign In</li>
</ul>
</section>
</nav>
</div>
<!--
End Top Utility Menu
-->
So, that's ONE menu (the very top 'Utility' menu) overridden. Working on the second, #main navigation menu now.
In short, they don't make it easy. It would be nice if I could leverage SASS mixins to create a .top-bar-2 class and just have at it, but it can't be done at this time.
I have the following scenario below-
HTML
<ul>
<li>Messi</li>
<li>Ronaldo</li>
<li>Neymar</li>
<li>Fabregas</li>
<li>Rooney</li>
<li>Bale</li>
<li>Ozil</li>
<li>Gerrard</li>
<li>Torres</li>
</ul>
CSS
ul{
list-style-type: none;
max-height: 65px;
outline:none;
overflow: auto;
width:200px;
}
li{
height: 20px;
padding: 10px 0;
text-indent: 10px;
width: 200px;
}
Now when i open this in Safari 7.0 (Mavericks) & use Voice Over Reader, first few items the black outline comes around the <li> items but after that the Voice Over reads the items but the black outline doesn't come on them. Also the items are hidden below the overflow clipped region.
This works fine in Safari 6.0.
I believe it has got to do something with the overflow property.
Any explanation & solution for this? Help is appreciated.
Thanks.
The following snippet of kendo ui mobile creates a list with a detail disclosure indicator (a ">" icon on the right of the list cell) on the first list item, when rendering the HTML for iOS devices:
<ul data-role="listview" data-click="tap_Item">
<li id="menuItem1"><a>Item one</a></li>
<li id="menuItem2">Item two</li>
<li id="menuItem3">Item three</li>
</ul>
Putting the "Item one" within an anchor tag gives that cell a detail disclosure indicator.
When using a custom template to generate the list:
<script type="text/x-kendo-template" id="custom_list">
<h3 class="item-title">${startDate}</h3>
</script>
how does one give the cells a detail disclosure indicator?
The easiest thing to do would be to add the css class km-listview-link to the contents of the list items:
<li id="menuItem2"><span class="km-listview-link">Item two</span></li>
Alternatively, this is the CSS that Kendo is using to put that arrow there. You could change the selector to something else.
.km-listview-link:after {
color: #7B7B7B;
border-color: #777;
content: "\a0";
display: block;
position: absolute;
right: 1rem;
top: 50%;
margin-top: -0.32rem;
margin-left: -0.2rem;
border-style: solid;
border-width: .24rem .24rem 0 0;
-webkit-transform: rotate(45deg);
-moz-transform: rotate(45deg);
-ms-transform: rotate(45deg);
-o-transform: rotate(45deg);
transform: rotate(45deg);
width: .5rem;
height: .5rem;
display: inline-block;
vertical-align: middle;
}
I would put an anchor tag around your header and give it the listview-link role:
<a data-role="listview-link"><h3 class="item-title">${startDate}</h3></a>
After my Browser was today updated to Firefox 7.0 on some of my pages elements are replaced with ... (elipses) and the z-index of items is all messed up.
I tried the same site in 3.6.2 and 6.0 and it is working fine. As soon so the machine updates to 7.0 or 8.0 beta it now longer renders so the problem is related to firefox.
I made a sample html page that shows the problem.
In the upper div i would expect the image to display in the button us it does in the lower div but it is replaced with .... It seems to be the text-overflow: ellipsis; css but why would this change on updating?
Does anyone have a suggestion?
<!DOCTYPE html>
<html>
<head>
<title>Infor DataGrid Sample </title>
<style>
.slick-headerrow-column {
background: #d5d5d5;
border-bottom: 0 none;
height: 100%;
margin-left: 2px;
padding-top: 2px;
}
.slick-headerrow-column, .slick-cell {
cursor: default;
float: left;
overflow: hidden;
padding: 3px;
text-overflow: ellipsis;
vertical-align: middle;
white-space: nowrap;
z-index: 1;
}
.inforFilterButton {
background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAARCAYAAADdRIy+AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAZdEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My41Ljg3O4BdAAAB0ElEQVQ4T62USWoCQRiF+wQeQZKt4MKVG68RSFAkS/EG3sBlFCdUslNxIYgLiVEQZwWHheKwMA444EIFPcCLr0gbDWgrpOFRXV1VX/31/r9Lkv770Wg0OofDMXa73fB6vfD7/QgEAkLBYPAm/cyf6A6PdICNfD4f4vE4stksCoUCyuUyKpXKzcpkMohGowiFQiPJ5XIhFoshn8+j0Wig0+mg1+thMBjcpVqthkQiAcnj8YA71Ot19Pt9jMdjLBYLoeVyeZM4dzqdCo7E4+ZyObTbbQFbrVbYbDZCFotFjMl9pZZ2SUxCsVhEt9vFfD7Her3GbrfDfr/HoQBgt9vFu5K4hr4LYKlUEr4xdEbBxZFIBFarFVqtVhEmb1atVn+B9O8UaDQakUwmoVarMZvNboJeBRLEnQmmz0pH5vhFIC0g0GazwWAwCOg14JvTJcYvAgmifzwypVKpLgIJe3oxnQOZTXrIlklhIhilHBWjJFjOvNzKMAKZ5WOErJ+/WVbyzB98F5FRzyazKLcjMJVK3QX8SH2ewUzmV/GnyMBhOBwWHX48LWylKDm+3W4xmUzQbDbRarWGkl6vfzzcEl+8bdLptLhtWPHc4B4R5nQ6H74BwAUeSLCHS8oAAAAASUVORK5CYII=");
border: medium none;
height: 16px;
left: -3px;
position: relative;
top: 4px;
width: 20px;
z-index: 10;
}
</style>
</head>
<body style="margin:10px;padding:10px">
<div class="ui-state-default slick-headerrow-column c2">
<button class="inforFilterButton contains" style="top: -3px;" title="Contains" type="button"> </button>
</div>
<br>
<br>
<button class="inforFilterButton contains" style="top: -3px;" title="Contains" type="button"></button>
</body></html>
Firefox 7 is the first Firefox release to implement text-overflow: ellipsis. It also implements what the spec said when Firefox 7 shipped, which was that if only one value is provided then it applies to both start and end sides of the overflowing container. In your case your buttons are positioned so they overflow the left edge of the container, so they're overflowing and get converted to ellipses.
Based on feedback from the experience with Firefox 7, the spec has since been changed to a behavior that's more compatible with the way IE originally implemented text-overflow: ellipsis, but there may be more changes happening there. The wonders of unstable specs that are written to not match deployed browser behavior...