<?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>DEV Community: Samiul Muztaba</title>
    <description>The latest articles on DEV Community by Samiul Muztaba (@samiulmuztaba).</description>
    <link>https://dev.to/samiulmuztaba</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%2F1184849%2Ffdb1439c-0cc1-4d53-8191-341dae68fc6a.jpeg</url>
      <title>DEV Community: Samiul Muztaba</title>
      <link>https://dev.to/samiulmuztaba</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/samiulmuztaba"/>
    <language>en</language>
    <item>
      <title>Problems I faced while creating my portfolio website and how I solved them</title>
      <dc:creator>Samiul Muztaba</dc:creator>
      <pubDate>Thu, 09 Nov 2023 13:16:28 +0000</pubDate>
      <link>https://dev.to/samiulmuztaba/problems-i-faced-while-creating-my-portfolio-website-and-how-i-solved-them-1ffd</link>
      <guid>https://dev.to/samiulmuztaba/problems-i-faced-while-creating-my-portfolio-website-and-how-i-solved-them-1ffd</guid>
      <description>&lt;p&gt;When you have already learned a programming language and are trying to do something with the programming language for the first time, you may encounter some problems. And, to solve the problems, you can take help from YouTube or other resources. I learned html and css a few months ago. Then, I learned Python. A few days ago I decided to build my portfolio. This is my first project with HTML and CSS. And yes, I faced many problems while creating this portfolio website. I asked for help with this problems and below I explain how I solved this problems.&lt;/p&gt;

&lt;h2&gt;
  
  
  Making message box without backend
&lt;/h2&gt;

&lt;p&gt;I told you that I only learned HTML and CSS, not JS. So, to receive messages from others, I don't use any JS or backend language, so how? The answer is I used formspree for this. You just need to visit the site &lt;a href="https://formspree.io/"&gt;by clicking here&lt;/a&gt;. Then, you need to click 'Start' and do the following. They may do some surveys with you. And after registration on formspree you need to click + icon to create a form. When you click the + icon to create a form, they will send you a verification mail. From Mail, you need to verify your email and then click the + icon again to create a form. This time, you don't have to do anything boring. Just give your form name and your email where all messages will be sent and your form will be created and look like the image below.&lt;br&gt;
&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmkji2bwm23ng2wtfogro.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmkji2bwm23ng2wtfogro.png" alt="Image description" width="800" height="414"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Here you will see the text "The endpoint of your form is:" and below this text you can see a link to copy: &lt;a href="https://formspree.io/f/yourformid"&gt;https://formspree.io/f/yourformid&lt;/a&gt;. Copy your ID from there and go back to your html file where you want to enter these codes&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;form&lt;/span&gt; &lt;span class="na"&gt;action=&lt;/span&gt;&lt;span class="s"&gt;"https://formspree.io/f/{form_id}"&lt;/span&gt; &lt;span class="na"&gt;method=&lt;/span&gt;&lt;span class="s"&gt;"post"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;label&lt;/span&gt; &lt;span class="na"&gt;for=&lt;/span&gt;&lt;span class="s"&gt;"email"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Your Email&lt;span class="nt"&gt;&amp;lt;/label&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;input&lt;/span&gt; &lt;span class="na"&gt;name=&lt;/span&gt;&lt;span class="s"&gt;"Email"&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"email"&lt;/span&gt; &lt;span class="na"&gt;type=&lt;/span&gt;&lt;span class="s"&gt;"email"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;button&lt;/span&gt; &lt;span class="na"&gt;type=&lt;/span&gt;&lt;span class="s"&gt;"submit"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Submit&lt;span class="nt"&gt;&amp;lt;/button&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/form&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Paste your form id into &lt;code&gt;form action="https://formspree.io/f/{form_id}"&lt;/code&gt;s &lt;code&gt;{form_id}&lt;/code&gt;. All that actually works is to make the real message box. Now, you can add more input and CSS for a nice look.&lt;/p&gt;

&lt;h2&gt;
  
  
  Choosing wrong css unit
&lt;/h2&gt;

&lt;p&gt;When I started building this website I didn't know that choosing pixel units was wrong. Because, pixel is a specific unit. When you use pixels, you have to resize a few times to make it responsive. And it's obviously boring and a waste of time. The right unit is rem. Because, rem units refer to the size of the root element. This means, it automatically resizes according to the device size. But, I didn't know this when I created the portfolio and was going to make it responsive. Here comes the simple two-step solution&lt;/p&gt;

&lt;h4&gt;
  
  
  1. Replacing all the px to rem
&lt;/h4&gt;

&lt;p&gt;You can do this simply with vscode. I only know the vscode trick to replace a text. If your code editor is not vscode, you can search how to replace all specified text with other text. In this case, I show how you can do it with vscode. First, go to Search from the activity bar. You can use shortcut &lt;code&gt;Ctrl + Shift + F&lt;/code&gt;. Then, search for "px" and below you'll see a replacement bar. Type "rem" in the replace bar and click the replace icon or just press &lt;code&gt;Ctrl + Alt + Enter&lt;/code&gt; on the keyboard and rem will appear where you type px.&lt;/p&gt;

&lt;h4&gt;
  
  
  2. Setting 1rem = 10px
&lt;/h4&gt;

&lt;p&gt;After replacing all the px to rem you will see all your sizes, margins etc will be bad because we didn't change the rem value. 1 rem = 16px and it's too big and cumbersome to calculate, for that, you can write the following in the CSS file:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nd"&gt;:root&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;font-size&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;62.5%&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nt"&gt;body&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;font-size&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1.6rem&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now go ahead and find all the rem values and divide them by 10, which is very easy. If the last digit of the value is &lt;code&gt;0&lt;/code&gt;, remove the &lt;code&gt;0&lt;/code&gt;, eg &lt;code&gt;20&lt;/code&gt; to &lt;code&gt;2&lt;/code&gt;. If the last digit of the value is not &lt;code&gt;0&lt;/code&gt; then add a &lt;code&gt;.&lt;/code&gt; before the digit, eg &lt;code&gt;24&lt;/code&gt; to &lt;code&gt;2.4&lt;/code&gt; and everything should be perfect.&lt;/p&gt;

&lt;h2&gt;
  
  
  Extra white space
&lt;/h2&gt;

&lt;p&gt;When making my website responsive, I noticed another problem that when the screen is small, an extra white space appears on the left side. To solve this write the following things inside a media query:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nt"&gt;html&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt;&lt;span class="nt"&gt;body&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nl"&gt;width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;100%&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="nl"&gt;height&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;100%&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="nl"&gt;margin&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="nl"&gt;padding&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="nl"&gt;overflow-x&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;hidden&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;overflow-x: hidden;&lt;/code&gt; is the main code to hide extra white space.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;I hope this post was helpful or good for you. I tried to explain all my problems but really, I can't explain all the problems and I am really sorry for that and if I have done any mistake, please forgive me. &lt;a href="//samiulmuztaba.pages.dev"&gt;Here&lt;/a&gt; is the link to the portfolio I was talking about.&lt;/p&gt;

&lt;p&gt;My portfolio website github project &lt;a href="https://github.com/SamiulMuztaba/Portfolio-html-css-responsive"&gt;link here&lt;/a&gt;&lt;br&gt;
My github &lt;a href="//github.com/SamiulMuztaba"&gt;link here&lt;/a&gt;&lt;br&gt;
I also write blogs at &lt;a href="//samiulmuztaba.hashnode.dev"&gt;here&lt;/a&gt; and &lt;a href="https://medium.com/@samiulmuztaba"&gt;here&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Comment my mistakes, where you got help, which part was best etc below.&lt;/p&gt;

&lt;p&gt;Thanks! Have a good day!&lt;/p&gt;

</description>
      <category>programming</category>
      <category>html</category>
      <category>css</category>
      <category>webdev</category>
    </item>
  </channel>
</rss>
