<?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: Irvirty</title>
    <description>The latest articles on Forem by Irvirty (@irvirty).</description>
    <link>https://forem.com/irvirty</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%2F3009270%2Ff1567dce-7325-4dbc-b6ee-b61b03866fd9.png</url>
      <title>Forem: Irvirty</title>
      <link>https://forem.com/irvirty</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/irvirty"/>
    <language>en</language>
    <item>
      <title>Responsive Web Design</title>
      <dc:creator>Irvirty</dc:creator>
      <pubDate>Fri, 22 May 2026 09:10:35 +0000</pubDate>
      <link>https://forem.com/irvirty/responsive-web-design-4km0</link>
      <guid>https://forem.com/irvirty/responsive-web-design-4km0</guid>
      <description>&lt;h1&gt;
  
  
  Beginning:
&lt;/h1&gt;

&lt;p&gt;Responsive web design is a web design or CSS style that makes a website look good on any screen size.&lt;/p&gt;

&lt;p&gt;Note: The most popular responsive design technique is "Mobile First Design".&lt;/p&gt;

&lt;p&gt;To make the page optimized for mobile devices, first use this meta tag in the "head"&lt;br&gt;
Сode:&lt;br&gt;
&lt;code&gt;&amp;lt;meta name="viewport" content="width=device-width, initial-scale=1" /&amp;gt;&lt;/code&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  CSS Responsive Design can be achieved by using:
&lt;/h1&gt;

&lt;ul&gt;
&lt;li&gt;CSS units as percentages "%" (100%), "1fr" (for grid). "vw".&lt;/li&gt;
&lt;li&gt;"media query".&lt;/li&gt;
&lt;li&gt;CSS property: "max-width", "min-width".&lt;/li&gt;
&lt;li&gt;Maybe something else.&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  A few of my own examples of what I use:
&lt;/h1&gt;

&lt;ol&gt;
&lt;li&gt;If the width of the screen is 500 pixels or less, we do something, or if it is more than 500 pixels, we do something else.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a class="mentioned-user" href="https://dev.to/media"&gt;@media&lt;/a&gt;(max-width: 500px){&lt;br&gt;
p {&lt;br&gt;
color: red;&lt;br&gt;
}&lt;br&gt;
}&lt;/p&gt;

&lt;p&gt;&lt;a class="mentioned-user" href="https://dev.to/media"&gt;@media&lt;/a&gt;(min-width: 500px){&lt;br&gt;
p {&lt;br&gt;
color: blue;&lt;br&gt;
}&lt;br&gt;
}&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;This CSS code prevents images from overflowing and sets the automatic size for the picture:&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;code&gt;img {&lt;br&gt;
max-width:100%;&lt;br&gt;
height: auto;&lt;br&gt;
display: inline-block;&lt;br&gt;
}&lt;/code&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;My responsive content or page "wrapper" class. This wrapper in the example makes the content no wider than 560px and a width of 100% makes it adaptive to any screen:&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;code&gt;.wrapper {&lt;br&gt;
width: 100%;&lt;br&gt;
max-width: 560px;&lt;br&gt;
margin: 0 auto;&lt;br&gt;
}&lt;/code&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Hide 1 and show 2 something depending on the screen size or dynamic style change. Hide the desktop version and show the mobile version of something instead. (A drop down menu or something else):&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a class="mentioned-user" href="https://dev.to/media"&gt;@media&lt;/a&gt;(width &amp;gt;= 500px){&lt;br&gt;
p { color: red; }&lt;br&gt;
}&lt;/p&gt;

&lt;p&gt;&lt;a class="mentioned-user" href="https://dev.to/media"&gt;@media&lt;/a&gt;(width &amp;lt;= 500px){&lt;br&gt;
p { color: green; }&lt;br&gt;
}&lt;/p&gt;

&lt;p&gt;or&lt;/p&gt;

&lt;p&gt;&lt;a class="mentioned-user" href="https://dev.to/media"&gt;@media&lt;/a&gt;(width &amp;gt;= 500px){&lt;br&gt;
.mobileVersion { display: none; }&lt;br&gt;
.desktopVersion { display: block; color: red }&lt;br&gt;
}&lt;/p&gt;

&lt;p&gt;&lt;a class="mentioned-user" href="https://dev.to/media"&gt;@media&lt;/a&gt;(width &amp;lt;= 500px){&lt;br&gt;
.mobileVersion { display: block; color: green; }&lt;br&gt;
.desktopVersion { display: none; }&lt;br&gt;
}&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Personal experience and advice or technique:&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;I write CSS styles simultaneously for any screen, my method is the method of overriding the style above with the style below (hierarchy in CSS), for example, there is a regular style for large screens:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;.testClass { color: red; }&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Then under it I add the same CSS class and properties from the style above with values for other screens using CSS Media Queries: &lt;/p&gt;

&lt;p&gt;.testClass { color: red; }&lt;/p&gt;

&lt;p&gt;&lt;a class="mentioned-user" href="https://dev.to/media"&gt;@media&lt;/a&gt; (max-width: 500px) { &lt;br&gt;
.testClass { color: orange; }&lt;br&gt;
}&lt;/p&gt;

&lt;p&gt;&lt;a class="mentioned-user" href="https://dev.to/media"&gt;@media&lt;/a&gt; (max-width: 300px) { &lt;br&gt;
.testClass { color: blue; }&lt;br&gt;
}&lt;/p&gt;

&lt;p&gt;&lt;a class="mentioned-user" href="https://dev.to/media"&gt;@media&lt;/a&gt; (max-width: 100px) { &lt;br&gt;
.testClass { color: yellow; }&lt;br&gt;
}&lt;/p&gt;

&lt;p&gt;so I override the style above and create a new style with overriding method for screens that are not larger than 500 pixels, then for 200px with overwriting  , then for 100px etc&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Note, testing and debugging:&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;Resize the browser window to see the style changes.&lt;/li&gt;
&lt;li&gt;Launch the developer tool in the browser through the menu and "Inspect" page and change the size of the window there.&lt;/li&gt;
&lt;li&gt;In developer tools, you can choose mobile phone simulation: "Responsive Design Mode" (phone icon).&lt;/li&gt;
&lt;li&gt;Of course, a test on a physical device.&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  Source and Learning:
&lt;/h1&gt;

&lt;ul&gt;
&lt;li&gt;Responsive design - Learn web development | MDN - &lt;a href="https://developer.mozilla.org/docs/Learn/CSS/CSS_layout/Responsive_Design" rel="noopener noreferrer"&gt;https://developer.mozilla.org/docs/Learn/CSS/CSS_layout/Responsive_Design&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Responsive web design basics  |  Articles  |  web.dev - &lt;a href="https://web.dev/articles/responsive-web-design-basics" rel="noopener noreferrer"&gt;https://web.dev/articles/responsive-web-design-basics&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Mobile-First CSS: Is It Time for a Rethink? – A List Apart - &lt;a href="https://alistapart.com/article/mobile-first-css-is-it-time-for-a-rethink/" rel="noopener noreferrer"&gt;https://alistapart.com/article/mobile-first-css-is-it-time-for-a-rethink/&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Doc:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Viewport meta tag - HTML: HyperText Markup Language | MDN - &lt;a href="https://developer.mozilla.org/docs/Web/HTML/Viewport_meta_tag" rel="noopener noreferrer"&gt;https://developer.mozilla.org/docs/Web/HTML/Viewport_meta_tag&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Beginner's guide to media queries - Learn web development | MDN - &lt;a href="https://developer.mozilla.org/docs/Learn/CSS/CSS_layout/Media_queries" rel="noopener noreferrer"&gt;https://developer.mozilla.org/docs/Learn/CSS/CSS_layout/Media_queries&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Using media queries - CSS: Cascading Style Sheets | MDN - &lt;a href="https://developer.mozilla.org/docs/Web/CSS/CSS_media_queries/Using_media_queries" rel="noopener noreferrer"&gt;https://developer.mozilla.org/docs/Web/CSS/CSS_media_queries/Using_media_queries&lt;/a&gt;
CSS values and units - Learn web development | MDN - &lt;a href="https://developer.mozilla.org/docs/Learn/CSS/Building_blocks/Values_and_units" rel="noopener noreferrer"&gt;https://developer.mozilla.org/docs/Learn/CSS/Building_blocks/Values_and_units&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>css</category>
      <category>tutorial</category>
      <category>webdev</category>
      <category>webdesign</category>
    </item>
    <item>
      <title>Instruction: how to create a website (HTML file, webpage, or HTML document)</title>
      <dc:creator>Irvirty</dc:creator>
      <pubDate>Thu, 21 May 2026 08:44:15 +0000</pubDate>
      <link>https://forem.com/irvirty/instruction-how-to-create-a-website-html-file-webpage-or-html-document-33b0</link>
      <guid>https://forem.com/irvirty/instruction-how-to-create-a-website-html-file-webpage-or-html-document-33b0</guid>
      <description>&lt;p&gt;To create an HTML page and view it, we will use your pre-installed programs, such as a text editor and a browser.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;First step: you need to create a file "index.html" with the ".html" extension. To do this, use this instruction to enable file extensions:&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Windows &lt;a href="https://stackoverflow.com/a/71899738/22625440" rel="noopener noreferrer"&gt;https://stackoverflow.com/a/71899738/22625440&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;MacOS &lt;a href="https://support.apple.com/guide/mac-help/show-or-hide-filename-extensions-on-mac-mchlp2304/mac" rel="noopener noreferrer"&gt;https://support.apple.com/guide/mac-help/show-or-hide-filename-extensions-on-mac-mchlp2304/mac&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Create a file: index.html&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;The second step is to place this code in an index.html file. To do this, open your index.html file in a text editor or in a code editor, copy this code, paste it into the editor, and save the changes or save file (or save as "index.html").&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;code:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;&amp;lt;!DOCTYPE html&amp;gt;&lt;br&gt;
&amp;lt;html&amp;gt;&lt;br&gt;
  &amp;lt;head&amp;gt;&lt;br&gt;
    &amp;lt;title&amp;gt;This is a title&amp;lt;/title&amp;gt;&lt;br&gt;
  &amp;lt;/head&amp;gt;&lt;br&gt;
  &amp;lt;body&amp;gt;&lt;br&gt;
        &amp;lt;p&amp;gt;Hello world!&amp;lt;/p&amp;gt;&lt;br&gt;
  &amp;lt;/body&amp;gt;&lt;br&gt;
&amp;lt;/html&amp;gt;&lt;/code&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Done. Open your index.html file in a browser, such as Chrome, Firefox, Edge, or Safari, to see the result.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Sources:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;HTML - Wikipedia - &lt;a href="https://en.wikipedia.org/wiki/HTML" rel="noopener noreferrer"&gt;https://en.wikipedia.org/wiki/HTML&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Windows file extension - &lt;a href="https://stackoverflow.com/a/71899738/22625440" rel="noopener noreferrer"&gt;https://stackoverflow.com/a/71899738/22625440&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;MacOS file extension - &lt;a href="https://support.apple.com/guide/mac-help/show-or-hide-filename-extensions-on-mac-mchlp2304/mac" rel="noopener noreferrer"&gt;https://support.apple.com/guide/mac-help/show-or-hide-filename-extensions-on-mac-mchlp2304/mac&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>html</category>
      <category>webdev</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Automatically change the theme in Ubuntu depending on the time of day</title>
      <dc:creator>Irvirty</dc:creator>
      <pubDate>Thu, 16 Oct 2025 05:15:18 +0000</pubDate>
      <link>https://forem.com/irvirty/automatically-change-the-theme-in-ubuntu-based-on-the-time-of-day-3023</link>
      <guid>https://forem.com/irvirty/automatically-change-the-theme-in-ubuntu-based-on-the-time-of-day-3023</guid>
      <description>&lt;p&gt;Steps:&lt;/p&gt;

&lt;h2&gt;
  
  
  Download the Gnome extension:
&lt;/h2&gt;

&lt;p&gt;Night Theme Switcher - &lt;a href="https://nightthemeswitcher.romainvigier.fr/" rel="noopener noreferrer"&gt;https://nightthemeswitcher.romainvigier.fr/&lt;/a&gt; or &lt;a href="https://extensions.gnome.org/extension/2236/night-theme-switcher/" rel="noopener noreferrer"&gt;https://extensions.gnome.org/extension/2236/night-theme-switcher/&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Create 2 bash scripts:
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;day.sh&lt;/strong&gt; with this code to change the theme:&lt;br&gt;
&lt;code&gt;gsettings set org.gnome.desktop.interface gtk-theme 'Adwaita-lgiht';&lt;br&gt;
gsettings set org.gnome.desktop.interface color-scheme 'prefer-light';&lt;/code&gt;  &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;night.sh&lt;/strong&gt;:&lt;br&gt;
&lt;code&gt;gsettings set org.gnome.desktop.interface gtk-theme 'Adwaita-dark';&lt;br&gt;
gsettings set org.gnome.desktop.interface color-scheme 'prefer-dark'&lt;/code&gt;  &lt;/p&gt;

&lt;h2&gt;
  
  
  In the extension settings "Commands" insert these scripts to execute:
&lt;/h2&gt;

&lt;p&gt;For sunrise: &lt;code&gt;bash /path/day.sh&lt;/code&gt;&lt;br&gt;
For sunset: &lt;code&gt;bash /path/night.sh&lt;/code&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Done.
&lt;/h2&gt;

</description>
      <category>darkmode</category>
      <category>ubuntu</category>
      <category>gnome</category>
      <category>lightmode</category>
    </item>
  </channel>
</rss>
