tag:blogger.com,1999:blog-34454975.post4498562355739622589..comments2023-06-28T16:58:41.189+02:00Comments on Web Reflection: CSS Position Fixed SolutionAndrea Giammarchihttp://www.blogger.com/profile/16277820774810688474noreply@blogger.comBlogger17125tag:blogger.com,1999:blog-34454975.post-21264765407177427002011-11-10T13:47:43.306+01:002011-11-10T13:47:43.306+01:00Thank you so much for this. Ridiculous that we sho...Thank you so much for this. Ridiculous that we should have to implement a solution like this in this day and age, but a malformed doctype out of our control left us with no other position:fixed solutions working. Yours does. Might be an old post, but thank you all the same.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-34454975.post-35921784246742564192011-10-05T14:16:49.240+02:002011-10-05T14:16:49.240+02:00For android devices, i tested something I found on...For android devices, i tested something I found on this page<br />http://kentbrewster.com/android-scroller/<br />I think it has to do with the meta tag specification; the css remains- position:fixed, bottom:0 or top:0 or top:50%, ... depending on where you want to fix itRobot Peterhttps://www.blogger.com/profile/09218399674173042806noreply@blogger.comtag:blogger.com,1999:blog-34454975.post-68521338615864367372010-08-15T09:32:15.750+02:002010-08-15T09:32:15.750+02:00awesome dude, thank you verymuch... its more helpf...awesome dude, thank you verymuch... its more helpful for mekannanhttps://www.blogger.com/profile/16846729881832909729noreply@blogger.comtag:blogger.com,1999:blog-34454975.post-71751083256065519082010-03-29T20:25:37.187+02:002010-03-29T20:25:37.187+02:00well, there may be some valid hack, the point here...well, there may be some valid hack, the point here is that JavaScript cannot solve this problem since it's not executed while we are scrolling the page but a scrolling div width 100% and height N pixels with another one after as bottom div, plus some trick over touchmove could potentially solve Android and iPhone problem (handling manually the scrollable div)Andrea Giammarchihttps://www.blogger.com/profile/16277820774810688474noreply@blogger.comtag:blogger.com,1999:blog-34454975.post-69447790235048149052010-03-29T18:23:31.002+02:002010-03-29T18:23:31.002+02:00So there's currently no solution to a position...So there's currently no solution to a position:fixed element in an iPhone/mobile browser?<br /><br />A client brought this nasty little fact to my attention and I've been hunting for a solution to a bottom-positioned footer bar that is floating in the middle of her iPhone screen!<br /><br />Any hacks you didn't try yet but think might work?Emlynhttps://www.blogger.com/profile/05998505131014678669noreply@blogger.comtag:blogger.com,1999:blog-34454975.post-87216156246571375322009-11-13T17:45:33.367+01:002009-11-13T17:45:33.367+01:00Thanks for posting this! I have to use quirks mod...Thanks for posting this! I have to use quirks mode - and this is the only fix I found to properly emulate 'position:fixed' in quirks mode in IE 7 .Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-34454975.post-42389527624794304052009-10-25T12:03:44.622+01:002009-10-25T12:03:44.622+01:00Dean IE7 is not a couple of CSS file for few bytes...Dean IE7 is not a couple of CSS file for few bytes.<br />You are assuming I did not know Dean Edwards solution which is false.<br />This is a solution which is simple, lightweight, cross-browser, and does not use JavaScript in the meaning there is no JavaScript inclusion at all neither a global pollution of variables or a namespace.<br />If you need Dean's IE7 use it, what I have provided here is something different not present in Dean IE7<br /><br />RegardsAndrea Giammarchihttps://www.blogger.com/profile/16277820774810688474noreply@blogger.comtag:blogger.com,1999:blog-34454975.post-72730624359624169522009-10-25T11:19:29.638+01:002009-10-25T11:19:29.638+01:00Dean Edwards solution uses CSS expressions. The Ja...Dean Edwards solution uses CSS expressions. The Javascript merely rewrites the stylesheet.Seanhttps://www.blogger.com/profile/13465240528642150115noreply@blogger.comtag:blogger.com,1999:blog-34454975.post-46511588250086484192009-10-24T11:52:10.545+02:002009-10-24T11:52:10.545+02:00shogun70 without JavaScript dependencies means no ...shogun70 without JavaScript dependencies means no needs for JavaScript manipulation.<br /><br />JavaScript is required only in IE6 expressions, IE7 if not in quirks mode is already compatible with position fixed.<br /><br />I am sure Dean, as me and everybody else, solved the problem via JavaScript ages ago, not big deal, but you cannot find similar, lightweight, cross-browser solutions like this one.<br /><br />If you can find something better please share. ThanksAndrea Giammarchihttps://www.blogger.com/profile/16277820774810688474noreply@blogger.comtag:blogger.com,1999:blog-34454975.post-10630672605945988702009-10-24T08:46:47.286+02:002009-10-24T08:46:47.286+02:00I'm not sure what you meant by "without J...I'm not sure what you meant by "without Javascript dependencies", but this solution won't work if Javascript is disabled. <br /><br />Also, I'm pretty sure Dean Edwards IE7 solved this one about five years ago. <br /><br />Thanks for the tip about Android, etc. I can easily imagine those mobile browsers making web-dev really frustrating. (I mean, even more than it was.)Seanhttps://www.blogger.com/profile/13465240528642150115noreply@blogger.comtag:blogger.com,1999:blog-34454975.post-19752525816249035452009-10-21T16:13:49.284+02:002009-10-21T16:13:49.284+02:00@MIvan IE will try to download "foo" in ...@MIvan IE will try to download "foo" in that case, probably this is better:<br /><i>body {<br /> background: url(data:null) fixed;<br />}</i>Andrea Giammarchihttps://www.blogger.com/profile/16277820774810688474noreply@blogger.comtag:blogger.com,1999:blog-34454975.post-75490865187376898492009-10-21T16:13:48.673+02:002009-10-21T16:13:48.673+02:00@MIvan IE will try to download "foo" in ...@MIvan IE will try to download "foo" in that case, probably this is better:<br /><i>body {<br /> background: url(data:null) fixed;<br />}</i>Andrea Giammarchihttps://www.blogger.com/profile/16277820774810688474noreply@blogger.comtag:blogger.com,1999:blog-34454975.post-77849561446295660352009-10-14T20:27:32.248+02:002009-10-14T20:27:32.248+02:00Great solution, the best I've seen and easy to...Great solution, the best I've seen and easy to port to any page. Thanks, I'm glad to have this in my coding toolbox<br /><br />G. LudwigAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-34454975.post-26011477439641731052009-10-02T17:48:32.663+02:002009-10-02T17:48:32.663+02:00P.S. moreover ... CSS hacks are a bad thing, not l...P.S. moreover ... CSS hacks are a bad thing, not less than expressions, conditional comments are an acceptable, suggested, solution, for IE related stuff.Andrea Giammarchihttps://www.blogger.com/profile/16277820774810688474noreply@blogger.comtag:blogger.com,1999:blog-34454975.post-40494948014083430192009-10-02T17:47:13.982+02:002009-10-02T17:47:13.982+02:00Fabrizio your one is just another solution that do...Fabrizio your one is just another solution that does not bring anything different and I am not sure it is going to work in quirks mode.<br /><br />CSS expressions or a behavior used for CSS purpose does not make any difference, you are using code to manipulate CSS.<br /><br />Your htc file could require special settings in the web server, some webserver won't work as expected with unrecognized file and this could cause problems.<br /><br />My code is so simple that it does not require effort to be maintained, but the point is that it simply works, with semantic classes for common positions, and it is lighter than your code.<br /><br />Finally, there is no reason to say: <i>If you use expressions coordinates will be hard coded</i>, as you can spot, there is nothing hard coded here.<br /><br />I have to say, in any case, I did not know that article, but now that I do, I will continue to use my solution but thanks in any case for the alternative, just consider that these things are for IE6 and htc or not, it is slow by default :)<br /><br />RegardsAndrea Giammarchihttps://www.blogger.com/profile/16277820774810688474noreply@blogger.comtag:blogger.com,1999:blog-34454975.post-61844813883115969382009-10-02T16:41:04.679+02:002009-10-02T16:41:04.679+02:00I published a solution several months ago in http:...I published a solution several months ago in http://css.html.it/articoli/leggi/3074/position-fixed-performante-su-ie6/<br /><br />I wrote it in italian, but the available code for download should be clear to everyone. And it includes the MIvan suggestion.<br /><br />ByeFabrizio Calderannoreply@blogger.comtag:blogger.com,1999:blog-34454975.post-72692426021594370962009-09-30T13:52:22.525+02:002009-09-30T13:52:22.525+02:00I have seen many sollutions on the web for this pr...I have seen many sollutions on the web for this problem, but this was the right one.<br />Only one little addition, to stop the jumpy effect: put <br />background: url(foo) fixed;<br />into body{}<br />Thx!MIvannoreply@blogger.com