Anonymous
Not logged in
Talk
Contributions
Create account
Log in
Publication Station
Search
Editing
Courses/Jouw Site op Kleine Schermpjes
(section)
From Publication Station
Namespaces
Page
Discussion
More
More
Page actions
Read
Edit
History
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
= Responsive Web Design = === Steps for graceful degradation: === '''1 Set the initial scale:''' <nowiki><meta name="viewport" content="width=device-width; initial-scale=1.0"></nowiki> '''2 Use CSS media queries to hide unnecessary content''' Space is precious on smaller screens, so you'll want to hide things like footers and decorative elements. <nowiki>@media screen and (max-width: 560px) { #footer { display:none; } } </nowiki> '''3 Use relative positioning on your content blocks for smaller screens''' On bigger screens, you can easily have multiple blocks of content next to each other. If the screen is smaller, this becomes more difficult. On medium sized screens this can be solved by making the blocks narrower. But if the screen gets even smaller, you'll have to stack all blocks vertically and make them fill the entire width of the screen: <nowiki> @media screen and (max-width: 400px) { #block { width:100%; float:none; } } </nowiki> '''4 Resize fonts and other elements for smaller screens''' To save even more space, the size of individual elements can also be decreased. <nowiki>@media screen and (max-width: 560px) { p { font-size:9px; } } </nowiki> '''5 Restyle specific elements to make them more mobile-friendly''' Some traditional elements on a web page take too much space or don't work well on smaller screens. For example, if a large menu fills almost the entire screen it may be better to only make it visible if the user taps the menu button. <nowiki> @media screen and (max-width: 400px) { #menu_container #menu {display:none;} #menu_container:hover #menu {display:block;} } </nowiki>
Summary:
Please note that all contributions to Publication Station are considered to be released under the Creative Commons Attribution-NonCommercial-ShareAlike (see
Publication Station:Copyrights
for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource.
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation
Main navigation
Main page
Printmaking Studio
Print Studio
Dig. Publishing Studio
Namespaces
Grafiwiki
Random Page
Log in
Wiki tools
Wiki tools
Page tools
Page tools
User page tools
More
What links here
Related changes
Page information
Page logs