I have a div that has the following css: position: fixed; height: 100%; left: 50%;
Is it possible to have this element at left: 50% in situations when the 50% of browser width equals >500px and left: 500px when 50% of the browser width equals <500px?
I.e the element would be positioned at the larger value: 500px OR 50% IF 50% > 500px.
Thanks
The best thing to do would be to use media queries
Here is the W3 spec:
http://www.w3.org/TR/css3-mediaqueries/#media0
Here is a working example: http://jsfiddle.net/davetayls/CTwuc/3/embedded/result/
And the code: http://jsfiddle.net/davetayls/CTwuc/3/