Note that there are some explanatory texts on larger screens.

plurals
  1. POfixed positioning for a floating menu to support mobile browsers
    primarykey
    data
    text
    <p>I'm a C# .NET developer however terrible at CSS although I do put in a good effort before asking questions. I'm using some basic jQuery, CSS and HTML Tables (yes I know tables) to build out my only photo portfolio that was previously in flash. The issue I'm having is when viewing the website on a mobile device like an iPhone or Android, in my case screen shots with a Galaxy S3, if the user zooms in on the photos the menu that I've fixed positioned moves over top of the photos. </p> <p>EDIT: I'm using the fixed position so that the menu "floats" in the same place over the photos, and follows the scroll bar as the user scrolls, making it accessible as the user scrolls to the end of the photos. I've updated the CSS to the 1st response, however the menu no longer remains on screen as you scroll. I should have originally included this note in the post. </p> <p>Link to the website: <a href="http://briangarson.com" rel="nofollow noreferrer">http://briangarson.com</a></p> <p>Screen shots:</p> <p>user zoomed in by pinching - the menu floats overtop of the images:</p> <p><a href="http://briangarson.com/screen1.png" rel="nofollow noreferrer">screen shot 1 - zoomed in http://briangarson.com/screen1.png</a></p> <p>Not zoomed in:</p> <p><a href="http://briangarson.com/screen2.png" rel="nofollow noreferrer">screen shot 1 - zoomed in http://briangarson.com/screen2.png</a></p> <p>The code I'm using (probably easier to simply view source on my website) but here goes</p> <pre><code>&lt;style type="text/css"&gt; body { background-color: #FFFFFF; } .gallery { height: 600px; } #content{ margin-top: 50px; } #menu{ margin-left: 15px; position: fixed; } table{ padding-top: 90px; } td{ padding-left: 15px; } a{ color:#1A1A1A; } a.on{ text-decoration: none; } &lt;/style&gt; </code></pre> <p>and the HTML </p> <pre><code>&lt;div id="content"&gt; &lt;div id="menu"&gt; &lt;img src="http://briangarson.com/logo.gif"&gt; &lt;a id="navSkate" class="on" href="#"&gt;Skate&lt;/a&gt; | &lt;a id="navMusic" href="#"&gt;Music&lt;/a&gt; | &lt;a id="navFashion" href="#"&gt;Fashion&lt;/a&gt; | &lt;A target=_blank href="mailto:photo@briangarson.com"&gt;Info&lt;/a&gt; &lt;/div&gt; &lt;table&gt; &lt;tr id="fashion"&gt; &lt;td&gt;&lt;img class="gallery" src="photos/352cassandra_aylmer.jpg"&gt;&lt;/td&gt; &lt;td&gt;&lt;img class="gallery" src="photos/811for_web_low_res_texture_0141-editweb.jpg"&gt;&lt;/td&gt; &lt;td&gt;&lt;img class="gallery" src="photos/78420061105031421_carolina_01_floor_srgb.jpg"&gt;&lt;/td&gt; &lt;td&gt;&lt;img class="gallery" src="photos/91720061127164637_kat_salute_srgb_01.jpg"&gt;&lt;/td&gt; &lt;td&gt;&lt;img class="gallery" src="photos/997val__1262555511_4af982f854_o.jpg"&gt;&lt;/td&gt; &lt;td&gt;&lt;img class="gallery" src="photos/43620060531234234_geoff.jpg"&gt;&lt;/td&gt; &lt;td&gt;&lt;img class="gallery" src="photos/918christine_dsc_8737.jpg"&gt;&lt;/td&gt; &lt;td&gt;&lt;img class="gallery" src="photos/471debbie.jpg"&gt;&lt;/td&gt; &lt;td&gt;&lt;img class="gallery" src="photos/158alison_dsc_0602-edit.jpg"&gt;&lt;/td&gt; &lt;td&gt;&lt;img class="gallery" src="photos/95madelaine_bw.jpg"&gt;&lt;/td&gt; &lt;td&gt;&lt;img class="gallery" src="photos/971gabrielle_v3_bordered.jpg"&gt;&lt;/td&gt; &lt;td&gt;&lt;img class="gallery" src="photos/917ioanna_dsc_1937-edit.jpg"&gt;&lt;/td&gt; &lt;td&gt;&lt;img class="gallery" src="photos/96520061106010418_carolina_couch_01_srgb.jpg"&gt;&lt;/td&gt; &lt;td&gt;&lt;div style="display: block; width:100px;"&gt;&amp;nbsp;&lt;/div&gt;&lt;/td&gt; &lt;/tr&gt; &lt;/table&gt; &lt;/div&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload