Tech Forum Network

Programming, technical solutions and hot scripts
Home » Scripting » CSS Columns Bug — breaks in mobile while using the :checked pseudo class

CSS Columns Bug — breaks in mobile while using the :checked pseudo class

February 28, 2012 Posted by forumadmin under Scripting
Comments off

I am building a portfolio website that uses only CSS3 to display a grid and filter out thumbnail images.

You can see what I’ve done here.

I got the filter functionality to work by using this tutorial and using the :checked pseudo class.

The grid is made using css3 columns to create a seamless responsive photo grid. I used Chris Coyier’s example.

Everything works in most modern browsers, but it breaks in mobile safari for the iPhone. Upon further testing, it seems to also break in the Sleipnir browser for iPhone, but WORKS in the Opera Mini browser. Also, it does the exact same thing on iOS Safari for iPad.

Also important to note that the bug does not occur because of the small browser width. It works fine at small browser widths on Mac OSX Safari 5.

Now on to the problem:
When viewed on the iPhone, everything looks great until you click on a filter label (web design, illustration, typefaces, identity, and print). After clicking on a label, nothing is suppose to move. Only the opacities of the thumbnails change. After clicking “Identity” for example, the right column breaks and the images seem to disappear. Now, click “All” and the images appear back into the right column and everything looks the way it did when you first visit the page.

The images seem to fall under the first column of images, below the footer and out of sight.

Here is what it’s suppose to look like after clicking “Identity” — http://cl.ly/1M3F1t1N410s150h1o40

Here is what it actually looks like right now — http://cl.ly/0r1v0Z2c1f0I2U0X0T3m

If you are interested, here is the code I am using for :checked pseudo class thumbnail filtering.

.ff-container input{
display: none;
}

.ff-items li img{
display: block;
}

.clr {
clear:both;
}

.ff-items li{
opacity: 0;
-webkit-transition: opacity 0.2s ease-in-out;
        transition: opacity 0.2s ease-in-out;   
}

.ff-container input.ff-selector-type-all:checked ~ .ff-items li,
.ff-container input.ff-selector-type-1:checked ~ .ff-items .ff-item-type-1,
.ff-container input.ff-selector-type-2:checked ~ .ff-items .ff-item-type-2,
.ff-container input.ff-selector-type-3:checked ~ .ff-items .ff-item-type-3,
.ff-container input.ff-selector-type-4:checked ~ .ff-items .ff-item-type-4,
.ff-container input.ff-selector-type-5:checked ~ .ff-items .ff-item-type-5{
opacity: 1;
}

.ff-container input.ff-selector-type-1:checked ~ .ff-items li:not(.ff-item-type-1),
.ff-container input.ff-selector-type-2:checked ~ .ff-items li:not(.ff-item-type-2),
.ff-container input.ff-selector-type-3:checked ~ .ff-items li:not(.ff-item-type-3),
.ff-container input.ff-selector-type-4:checked ~ .ff-items li:not(.ff-item-type-4),
.ff-container input.ff-selector-type-5:checked ~ .ff-items li:not(.ff-item-type-5){
opacity: 0.1;
}
Asked By – davecave        Read Answers         Answers : 1

More Related Questions

  • Fontello Glyph Font odd behaviour on Firefox, shows unicode codes instead of icons
    I have this site: http://domenicopiazza.com/_fotomia/ In the upper right corner I have some social icons. It shows okay in Chrome (both local and on the webserver), it shows ok in local FF, but on th...
  • css for double height text and double width text in font style
    Any one can help me to do double height text and double width text in font style(as like in dot matrix printers) in css without using any images. Any code other than this? heading{ font-weight:bo...
  • CSS3 issue with boxes width 100%
    I'm having problems with displaying some boxes CSS3, where the width is set to 100% but doesn't go all the way, i'm sure i made a mistake somewhere but i'm not sure where :). You'll see in the HTML c...
  • Jquery Autocomplete Menu Item Text Alignment/Padding/ Justified
    I have JQuery UI AutoComplete to a normal textbox displays few Item-Name with its Item-Code. I'm separating Item-name & Item-Code by Pipe-Character " | " - as shown below in the Image. Now, the ...
  • Adding a rounded similar to border-radius to outline
    Using CSS3 I would like to know if there is any way to create a rounded effect to an outline property. Maybe a CSS Hack or a JS option possible whitout using jQuery. The effect I would like to achive...
  • Right and left floating of odd and even elements
    Here's the problem. I got simple html template: <div class="wrapper"><div class="inside"> <div class="left"><p>Lorem ipsum...</p></div> <aside><p...
  • horizontal alignment of the div
    How to move the red border div adacent to the previous div.... i wanted to make the divs horizontal alignment.... i cave display inline and float property but the code is not working http://jsfiddle....
  • div to touch left and right end of browser
    how to move the defie div left and the sales order div right...... i gave float property but not working..... i wanted one div to touch extremely left and another div to move to the right.... providin...
  • CSS Confused with 100%. Need three blocks to stick to each other
    I'm using an <ul> block with three items (<li>) to structure a navigation area. The <ul> block does not have a fixed width. It fits its parent. I need all <li>s to be horizont...
  • Why margin:auto doesnt work?
    I want to center my element but when I use margin-left: auto; margin-right: auto; it doesn't work! this is my html <section id="t"> <article class="tc">Hi</article> <...
Email
Tags: css, css3, grid, mobile-safari, pseudo-class

Comments are closed.

« Suggestions for how to define command line parameters(Resolved)
Combining rows of queried results by unique identifier?(Resolved) »
Tech Forum Network powered by WordPress and The Clear Line Theme