<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: aneenajohn</title>
    <description>The latest articles on Forem by aneenajohn (@aneenajohn).</description>
    <link>https://forem.com/aneenajohn</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F524712%2F3ecc4739-727b-44a0-b72e-0d5930887a9c.jpg</url>
      <title>Forem: aneenajohn</title>
      <link>https://forem.com/aneenajohn</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/aneenajohn"/>
    <language>en</language>
    <item>
      <title>Day01- Conquering Responsive Layouts by Kevin Powell</title>
      <dc:creator>aneenajohn</dc:creator>
      <pubDate>Tue, 06 Apr 2021 17:55:48 +0000</pubDate>
      <link>https://forem.com/aneenajohn/day01-conquering-responsive-layouts-by-kevin-powell-4325</link>
      <guid>https://forem.com/aneenajohn/day01-conquering-responsive-layouts-by-kevin-powell-4325</guid>
      <description>&lt;h1&gt;
  
  
  Day 01: Using percentages &amp;amp; avoiding heights
&lt;/h1&gt;

&lt;h2&gt;
  
  
  Percentages Vs Fixed widths
&lt;/h2&gt;

&lt;p&gt;In this blog, let's see how effective percentage units are, while building a responsive website.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;By default, things are responsive.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Unless and until we don't assign a fixed width to any element our website is responsive. Whenever we try to create layouts for website, we create a problem by taking the responsiveness away. Then, we try to solve this problem that we have created by defining media queries for different screen sizes.&lt;/p&gt;

&lt;h2&gt;
  
  
  So, how can we fix this problem?
&lt;/h2&gt;

&lt;p&gt;As said earlier, "By default, things are responsive", which means that every element has a width of 100% of its parent. So, irrespective of the screen size, it is always 100% of viewport.&lt;br&gt;
Hence, we can make our life easier and pretty simple by giving width in terms of % values instead of a fixed value.&lt;/p&gt;
&lt;h2&gt;
  
  
  Percentages on the child.
&lt;/h2&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;body&amp;gt;
    &amp;lt;div class="parent"&amp;gt;
        &amp;lt;div class="child"&amp;gt;
            Lorem ipsum, dolor sit amet consectetur adipisicing elit. 
            Nesciunt nam ullam quo incidunt rerum corporis reprehenderit blanditiis natus quae consequatur,    
            possimus, dolores, mollitia a quis temporibus eos ut similique cupiditate!
        &amp;lt;/div&amp;gt;
    &amp;lt;/div&amp;gt;
&amp;lt;/body&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;When you give the parent, &lt;code&gt;width:80%&lt;/code&gt; and the child &lt;code&gt;width:50%&lt;/code&gt;, &lt;strong&gt;&lt;em&gt;what does it actually mean?&lt;/em&gt;&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.parent{
     width:80%;
     }

.child{
    width:50%;
    }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The parent class would have 80% width of its parent (ie) body and the child class would have 50% width of its parent (ie) 50% of the 80% given to the parent class.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;The bigger the parent gets, the bigger the child gets.&lt;br&gt;
The smaller the child gets, the smaller the child gets.&lt;br&gt;
It's always the relation between them.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;iframe height="600" src="https://codepen.io/aneenajohn/embed/zYNdRNR?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;h2&gt;
  
  
  Why it's a good idea to avoid heights?
&lt;/h2&gt;

&lt;p&gt;Whenever you give a fixed height to an element, when the screen gets smaller the content of the element overflows the parent.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--8HT_FLBa--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://miro.medium.com/max/800/1%2AtPabIHZvsGVL0sGVh3wPew.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--8HT_FLBa--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://miro.medium.com/max/800/1%2AtPabIHZvsGVL0sGVh3wPew.jpeg" alt="meme"&gt;&lt;/a&gt;&lt;br&gt;
But when you want the element to take up a certain height, &lt;em&gt;&lt;strong&gt;give padding around the element instead of the fixed value of height so that it becomes responsive.&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;iframe height="600" src="https://codepen.io/aneenajohn/embed/zYNdabm?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;h1&gt;
  
  
  Resources:
&lt;/h1&gt;

&lt;p&gt;This is going to be a series of blog from Conquering Responsive Layouts by Kevin Powell.&lt;br&gt;
&lt;a href="https://courses.kevinpowell.co/conquering-responsive-layouts"&gt;To view the course, click here&lt;/a&gt;&lt;/p&gt;

</description>
      <category>css</category>
      <category>webdev</category>
      <category>html</category>
      <category>frontend</category>
    </item>
    <item>
      <title>Make your web app mobile-friendly with just one line of code.</title>
      <dc:creator>aneenajohn</dc:creator>
      <pubDate>Tue, 22 Dec 2020 08:06:20 +0000</pubDate>
      <link>https://forem.com/aneenajohn/make-your-web-app-mobile-friendly-with-just-one-line-of-code-12ae</link>
      <guid>https://forem.com/aneenajohn/make-your-web-app-mobile-friendly-with-just-one-line-of-code-12ae</guid>
      <description>&lt;p&gt;In this blog,let me tell you how you can make any of your web app mobile friendly and how I made my portfolio mobile friendly with a single line of code.&lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;strong&gt;What is a mobile web app?&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;Mobile web apps are web apps optimized for a good phone experience. They aren’t mobile applications, but websites written in HTML/CSS and run by a browser. While they may be designed to resemble the feel of smartphone apps, they don’t have much in common.&lt;/p&gt;

&lt;p&gt;You need to understand that most web apps are viewed more often on a mobile device than on a desktop.&lt;/p&gt;

&lt;p&gt;You can achieve decent view across a number of mobile devices with just this single line inside your head tag in html file without any media queries.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;meta name="viewport" content="width=device-width, initial-scale=1.0" /&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Let's dig little deeper,
&lt;/h2&gt;

&lt;p&gt;The viewport is the user's visible area of a web page.HTML5 lets you play with this viewport via &lt;code&gt;&amp;lt;meta&amp;gt;&lt;/code&gt; tag.&lt;br&gt;
&lt;code&gt;width=device-width&lt;/code&gt; =&amp;gt; This basically tells the browser to render the page as per the screen-width of user's device.&lt;br&gt;
&lt;code&gt;initial-scale=1.0&lt;/code&gt; =&amp;gt; initial-scale property controls the zoom level when the page is first loaded.&lt;/p&gt;

&lt;p&gt;In my case for this &lt;a href="https://aneenajohn.netlify.app/" rel="noopener noreferrer"&gt;portfolio&lt;/a&gt; which I had made I had to set the &lt;code&gt;initial-scale=0.5&lt;/code&gt; which supresses the zoom level to 0.5 inorder to have better view in mobile devices.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fkavfds4wbcrqqx9maejd.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fkavfds4wbcrqqx9maejd.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Attributes of &lt;code&gt;&amp;lt;meta&amp;gt;&lt;/code&gt; tag
&lt;/h3&gt;

&lt;p&gt;The &lt;code&gt;width&lt;/code&gt; property controls the size of the viewport. It can be set to a specific number of pixels like &lt;code&gt;width=600&lt;/code&gt; or to the special value device-width&lt;br&gt;
&lt;code&gt;width&lt;/code&gt; =&amp;gt; The width of the virtual viewport of the device.&lt;br&gt;
&lt;code&gt;height&lt;/code&gt; =&amp;gt; The height of the “virtual viewport” of the device.&lt;br&gt;
The &lt;code&gt;maximum-scale&lt;/code&gt;, &lt;code&gt;minimum-scale&lt;/code&gt;, and &lt;code&gt;user-scalable&lt;/code&gt; properties control how users are allowed to zoom the page in or out.&lt;br&gt;
&lt;code&gt;maximum-scale=2.0&lt;/code&gt;=&amp;gt; limits the maximum value that the user can zoom to 2.0&lt;br&gt;
&lt;code&gt;minimum-scale=0.5&lt;/code&gt; =&amp;gt; limits the minimum value that the user can zoom to 0.5&lt;br&gt;
&lt;code&gt;user-scalable&lt;/code&gt; =&amp;gt; lets the user to zoom in or out.Takes the values yes or no.&lt;/p&gt;

&lt;p&gt;It’s generally recommended that you don’t prevent scaling.&lt;/p&gt;

&lt;h3&gt;
  
  
  Bonus Tip:
&lt;/h3&gt;

&lt;p&gt;Before you jump into figuring out the ways to optimise for mobile devices just peek into this &lt;a href="https://search.google.com/test/mobile-friendly" rel="noopener noreferrer"&gt;website&lt;/a&gt; to check whether your website is already mobile friendly.&lt;/p&gt;

&lt;p&gt;Mobile friendly tool offered by Google lets you get a quick answer on whether or not your website is mobile friendly.Just drop your url in the search box.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F7qmxirl1bw52iplrvz6a.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F7qmxirl1bw52iplrvz6a.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If this tool responds you with "your website needs a lot of work", then making your website mobile optimised should be treated as a top priority.&lt;/p&gt;

&lt;p&gt;I'd love to hear your opinions in the comment section.&lt;/p&gt;

&lt;p&gt;Thanks for reading...&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>portfolio</category>
      <category>beginners</category>
      <category>html</category>
    </item>
    <item>
      <title>How the web works- The big picture</title>
      <dc:creator>aneenajohn</dc:creator>
      <pubDate>Thu, 03 Dec 2020 09:39:05 +0000</pubDate>
      <link>https://forem.com/aneenajohn/how-the-web-works-the-big-picture-5611</link>
      <guid>https://forem.com/aneenajohn/how-the-web-works-the-big-picture-5611</guid>
      <description>&lt;p&gt;If you are/going to be a web developer ,then you must be aware of how web works or someone who is wondering what happens behind the scenes when you hit the search icon in your browser then I you would say you have landed at the right place.&lt;/p&gt;

&lt;p&gt;Here is the simplistic approach on &lt;strong&gt;how web works&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;let's see how browser communicates with server and get you what you wnat.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--FV2E32tr--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://image.slidesharecdn.com/lecture-2-160922145406/95/web-design-how-the-web-works-9-638.jpg%3Fcb%3D1474556059" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--FV2E32tr--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://image.slidesharecdn.com/lecture-2-160922145406/95/web-design-how-the-web-works-9-638.jpg%3Fcb%3D1474556059" alt="pic"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Browser&lt;/em&gt; :Hey! I want google.com.Do you know where it is?&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--gABGpXFV--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://encrypted-tbn0.gstatic.com/images%3Fq%3Dtbn:ANd9GcTT0NOnF-CntQBHAb575VWPkBVTI8tOd_gY7w%26usqp%3DCAU" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--gABGpXFV--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://encrypted-tbn0.gstatic.com/images%3Fq%3Dtbn:ANd9GcTT0NOnF-CntQBHAb575VWPkBVTI8tOd_gY7w%26usqp%3DCAU" alt="hey"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Name Server&lt;/em&gt; :Oh yeah,let me check.Here is the ip address of server where the website you are searching is hosted.&lt;/p&gt;

&lt;p&gt;Browser then goes to host server.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Browser&lt;/em&gt; : hey, I know you have this website. Can you give it to me. &lt;/p&gt;

&lt;p&gt;&lt;em&gt;Host server&lt;/em&gt; :Yeah, you can have this webpage.&lt;/p&gt;

&lt;p&gt;1.Your browser is the &lt;strong&gt;client&lt;/strong&gt; which requests the domain. This request goes to your ISP via modem.&lt;/p&gt;

&lt;p&gt;2.The ISP sends this request to &lt;strong&gt;Domain Name Sytem(DNS)&lt;/strong&gt; to fetch the IP address of server.&lt;/p&gt;

&lt;p&gt;3.The DNS sends the requested IP address to the web browser.&lt;/p&gt;

&lt;p&gt;4.This signal is then transmitted to the hosted server according to ip.&lt;/p&gt;

&lt;p&gt;5.The host server then execute the web page in your browser.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Need of DNS&lt;/strong&gt;&lt;br&gt;
The domain name system maps the url names to their respective IP address, which allows web browsers to access sites by using a name, rather than the site's IP address, which is more difficult to remember for humans.&lt;/p&gt;

&lt;p&gt;This entire process happen in just under &lt;strong&gt;a second&lt;/strong&gt; and accounts for 1 out of billion of internet requests that happens each day.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>beginners</category>
      <category>firstyearincode</category>
      <category>firstpost</category>
    </item>
  </channel>
</rss>
