Ace.....
November 1st, 2015, 02:35 AM
As a newcomer to responsive css, I downloaded a template.
It had some display errors, and seemed to behave in an illogical manner, but.....
.... I overcame those issues, and created a web page that would display correctly at all appropriate resolutions.
However; to me, the style sheet was a mess.
Various elements/classes & resolution commands, were not in order.
Thinking of the future; and not wanting to have to re-learn everything, I set about tidying, and commenting the relevant elements (and commenting out unused code).
Major division sections were placed in correct order, along with sub divisions, and <h> & <p> etc.
I then moved all the @media(max-width:XXXXpx) into a descending order, starting at 1440px down to 320px.
I had assumed that, like js commands, these @media groupings could be placed anywhere, but would be acted upon according to pixel resolution.
(placing them in logical order would then simplify future re-coding).
Apparently not.
After reloading the web page, many of the original display errors have returned.
It's not a disaster....... I can work my way through the changes required for each resolution.
So..... leaving aside the original template errors (one of which is outlined here (http://ubuntuforums.org/showthread.php?t=2301128&p=13382532#post13382532)).....
... am I right in having all the resolution changes grouped together in descending order?
OR was there method to the apparent madness of having @media(max-width:XXXXpx) groupings out of sequence?
It had some display errors, and seemed to behave in an illogical manner, but.....
.... I overcame those issues, and created a web page that would display correctly at all appropriate resolutions.
However; to me, the style sheet was a mess.
Various elements/classes & resolution commands, were not in order.
Thinking of the future; and not wanting to have to re-learn everything, I set about tidying, and commenting the relevant elements (and commenting out unused code).
Major division sections were placed in correct order, along with sub divisions, and <h> & <p> etc.
I then moved all the @media(max-width:XXXXpx) into a descending order, starting at 1440px down to 320px.
I had assumed that, like js commands, these @media groupings could be placed anywhere, but would be acted upon according to pixel resolution.
(placing them in logical order would then simplify future re-coding).
Apparently not.
After reloading the web page, many of the original display errors have returned.
It's not a disaster....... I can work my way through the changes required for each resolution.
So..... leaving aside the original template errors (one of which is outlined here (http://ubuntuforums.org/showthread.php?t=2301128&p=13382532#post13382532)).....
... am I right in having all the resolution changes grouped together in descending order?
OR was there method to the apparent madness of having @media(max-width:XXXXpx) groupings out of sequence?