<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Arun Pratap Singh on Medium]]></title>
        <description><![CDATA[Stories by Arun Pratap Singh on Medium]]></description>
        <link>https://medium.com/@arun-pratap-singh?source=rss-2eebe9ab2a86------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*gY8RuVSB7dCPiFpU</url>
            <title>Stories by Arun Pratap Singh on Medium</title>
            <link>https://medium.com/@arun-pratap-singh?source=rss-2eebe9ab2a86------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 28 Nov 2026 15:11:03 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@arun-pratap-singh/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[How I Built a Responsive Travel Website MyTrip Using CSS (No CSS Frameworks Used)]]></title>
            <link>https://medium.com/@arun-pratap-singh/how-i-built-a-responsive-travel-website-mytrip-using-css-no-css-frameworks-used-d49eaa97da25?source=rss-2eebe9ab2a86------2</link>
            <guid isPermaLink="false">https://medium.com/p/d49eaa97da25</guid>
            <category><![CDATA[html-css]]></category>
            <category><![CDATA[html-css-project]]></category>
            <category><![CDATA[html]]></category>
            <category><![CDATA[css]]></category>
            <category><![CDATA[travel-websites]]></category>
            <dc:creator><![CDATA[Arun Pratap Singh]]></dc:creator>
            <pubDate>Wed, 13 May 2026 10:46:55 GMT</pubDate>
            <atom:updated>2026-05-13T13:38:48.723Z</atom:updated>
            <content:encoded><![CDATA[<p>`After 4 years, I wrote CSS from scratch again without using frameworks like Bootstrap or Tailwind CSS.</p><p>I built this beginner-friendly project to refresh my CSS fundamentals like:</p><ul><li>Flexbox</li><li>Overlay effects</li><li>Image layouts</li><li>Hover effects</li><li>Transitions</li><li>Media queries for responsive design</li></ul><p>I am <a href="https://www.linkedin.com/in/ap-singh/">Arun Pratap Singh</a>. I have been building websites and e-commerce websites for more than 5 years. I started my career as a WordPress website Designer and slowly moved deeper into web development and programming with JavaScript.</p><p>I build applications using React and Gatsby and have completed 50+ client projects.</p><p>In this project, I built a travel website called MyTrip for travellers looking for adventures in different cities.</p><p>The project includes 3 pages:</p><ul><li>Landing page</li><li>Adventures list page</li><li>Adventure details page</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-ej9C-nCKMgdB2h2QP5-lg.png" /></figure><figure><img alt="MyTrip Adventures List Page Screenshot" src="https://cdn-images-1.medium.com/max/1024/1*JNaminScdPGteTDH1kAdyw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_SA8rfYARcm4NHI58IUUuw.png" /></figure><h3>Hero Section</h3><p>First, let’s talk about the hero section on the landing page.</p><p>I used Flexbox to centre the heading, paragraph, and input field both horizontally and vertically.</p><pre>.hero {<br>  position: relative;<br>  display: flex;<br>  justify-content: center;<br>  align-items: center;<br>  background-image: url(https://medium.com/&quot;/assets/cover-image.jpg&quot;);<br>  background-size: cover;<br>  color: white;<br>}</pre><p>I also added a black overlay on top of the background image to improve text visibility.</p><p>Instead of explaining only with words, here is the idea behind the overlay effect.</p><p><strong>Before Overlay: </strong>The image looks bright. Text is harder to read.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GMIEKl7dRupjrhlHwBmfJA.png" /><figcaption>Before Overlay Effect</figcaption></figure><p><strong>After Overlay:</strong> The dark layer improves contrast. Text becomes easier to read.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*q-607O_6lOyk6jT5xr4esA.png" /><figcaption>After Overlay Effect</figcaption></figure><h3>How I Created the Overlay Effect</h3><h4>Step 1</h4><p>Add a div element with the class overlay inside the section element that has the hero class.</p><pre>&lt;section class=&quot;hero&quot;&gt;<br>  &lt;div class=&quot;overlay&quot;&gt;&lt;/div&gt;<br>  ....<br>&lt;/section&gt;</pre><h4>Step 2</h4><ul><li>Set position: relative on the .hero class.</li><li>This step is important because the .overlay element uses position: absolute.</li><li>When the parent element uses position: relative. The overlay stays inside the hero section correctly.</li><li>Then add these properties to the .overlay class: Full width and height, Black background color with 0.7 opacity (70% transparency)</li></ul><p>This makes the overlay cover the entire hero section.</p><pre>.hero {<br>  position: relative;<br>}<br><br>.overlay {<br>  position: absolute;<br>  display: block;<br>  top: 0%;<br>  left: 0%;<br>  width: 100%;<br>  height: 100%;<br>  background-color: rgba(0, 0, 0, 0.7);<br>}</pre><h3>Image Positioning and Hover Zoom Effect</h3><p>Now let’s talk about image positioning and image zoom on hover. I also used the same overlay technique to make the entire card clickable.</p><h4>Step 1</h4><p>Set the image width to 100%. So it fills the card properly. Then use the object-fit property:</p><pre>.adventures-card img {<br>  width: 100%;<br>  object-fit: cover;<br>  transition: 0.5s all ease-in-out;<br>}</pre><p>This makes the image look clean without stretching.</p><p><strong>Left image:</strong> Without the object-fit property, the image looks stretched vertically.</p><p><strong>Right image:</strong> with object-fit: cover.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/327/1*BKgHJ8VneThlmZCXtNceuQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/323/1*H89aLM-NjSxkqzYLWpVXtQ.png" /></figure><pre>.adventures-card img {<br>  width: 100%;<br>  object-fit: cover;<br>  transition: 0.5s all ease-in-out;<br>}</pre><h4>Step 2</h4><p>Now we want the image to zoom when the user hovers over it. To achieve this, we use the :hover pseudo-class, trannsform and filter property</p><p>The scale() function helps to zoom the image. The brightness() filter controls image brightness on hover.</p><pre>.adventures-card:hover img {<br>  transform: scale(1.05);<br>  filter: brightness(70%);<br>}<br>.adventures-card img {<br>  /* other css property */<br>  transition: 0.5s all ease-in-out;<br>}</pre><blockquote><strong>Note:</strong> We also add transition property for smooth animation.</blockquote><p><strong>Left image:</strong> Without transition property, the hover effect changes instantly.</p><p><strong>Right Image:</strong> With transition property, the animation becomes smooth. The interaction feels more natural.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/248/1*UU0PEPVmoS6iMGCqIgsp1g.gif" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/248/1*h5ZEsUz0NGvCJBujpMMNxA.gif" /></figure><h3>Make the Entire Card Clickable</h3><p>To make the whole card clickable, we use the same overlay technique again. This time, we use an a (anchor) element instead of a div.</p><p>Then add the destination URL using the href attribute. This creates a clickable layer on top of the entire card.</p><pre>&lt;a style=&quot;position: absolute; top: 0px; left: 0px; width: 100%; height: 100%;&quot;<br>   href=&quot;/adventures/resort/&quot;&gt;&lt;/a&gt;</pre><blockquote><strong>Note:</strong> Whenever you use position: absolute, make sure the parent element uses position: relative. Without it, the element may move outside the expected container. This is one of the most important concepts when working with overlays and positioning in CSS.</blockquote><p><strong>Live Demo:</strong> <a href="https://my-trip-static.netlify.app/">https://my-trip-static.netlify.app/</a><br><strong>Complete source code:</strong> <a href="https://github.com/arun-pratap/my-trip-static-tavel-website.git">https://github.com/arun-pratap/my-trip-static-tavel-website.git</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d49eaa97da25" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>