Skip to content

Commit 1da17b3

Browse files
committed
added five points for responsive websites
1 parent 0aee5b0 commit 1da17b3

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

js3.html

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,19 @@ <h2>part -3: intermediate</h2>
8181

8282
<div id="responsiveWebsite">
8383
<p><strong>Question:</strong> What are the things you would do to make a website responsive</p>
84-
<p><strong>Answer:</strong></p>
84+
<p><strong>Answer:</strong> There is a series of stuff you can do. and a summery of them are</p>
85+
<ul>
86+
<li><strong>layout</strong>, keep it simple. dont use div, absolute position or float unnecessarily. kill inline styles. use HTML5 doctype, reset stylesheet, semantic core layout.</li>
87+
<li><strong>media queries</strong>, to load stylesheet based on the size of the media or apply rules based on the orientation of the media</li>
88+
<li><strong>breakpoints</strong>, choose the right breakpoints to switch style. common breakpoints are &lt;480px, &lt;768px, &gt;768px. There are three nice to have breakpoints &lt;320px, &gt;769px and &lt;1024px, &gt;1024px.</li>
89+
<li><strong>flexible</strong>, don't use fixed width rather use relative to viewport size. like em, %</li>
90+
<li><strong>pictures</strong>, pictures are a big of a deal for responsive websites. Right now you can change src attribute of an image based on the media query alone. Hence you can use background-image or use different picture versions and show/hide their parent in media queries.</li>
91+
<li><strong></strong></li>
92+
<li><strong></strong></li>
93+
<li><strong></strong></li>
94+
<li><strong></strong></li>
95+
<li><strong></strong></li>
96+
</ul>
8597
<p>ref: <a href="http://readwrite.com/2013/04/16/10-developer-tips-to-build-a-responsive-website-infographic#awesm=~ou5vLQZqqXIubV">Read best practices</a></p>
8698
</div>
8799

0 commit comments

Comments
 (0)