<?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: Chukwuemeka, Samuel Chinaza</title>
    <description>The latest articles on DEV Community by Chukwuemeka, Samuel Chinaza (@smlchinaza).</description>
    <link>https://dev.to/smlchinaza</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%2F1022108%2Fbae1ca46-8423-4766-92de-05dd5f85dc76.jpeg</url>
      <title>DEV Community: Chukwuemeka, Samuel Chinaza</title>
      <link>https://dev.to/smlchinaza</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/smlchinaza"/>
    <language>en</language>
    <item>
      <title>CSS - LAYOUT HIERARCHIES</title>
      <dc:creator>Chukwuemeka, Samuel Chinaza</dc:creator>
      <pubDate>Fri, 10 Feb 2023 12:11:11 +0000</pubDate>
      <link>https://dev.to/smlchinaza/css-layout-hierarchies-1bde</link>
      <guid>https://dev.to/smlchinaza/css-layout-hierarchies-1bde</guid>
      <description>&lt;p&gt;Creating layout with CSS can seem complicated at times and be a frustrating experience. But understanding everything about CSS layout boils down to one thing being 'relationships'. &lt;br&gt;
How these layouts relate to each other seems to be the ultimate hack between understanding it and utilising it. &lt;/p&gt;

&lt;p&gt;This article will deal with the most important part of dealing with CSS layout, which is relationship. &lt;br&gt;
In CSS, layouts do not stay on their own. In one way or the other it must be related to one thing on the page thereby creating a working relationship.&lt;br&gt;
The first relationship we will look at is somehow like a container-content relationship which can be easily illustrated with parent-child relationship.&lt;/p&gt;

&lt;p&gt;For example, let us look at a parent-child relationship and see how the width and height affect each other.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;html



&amp;lt;div class= "parent"&amp;gt;

/* Children */
&amp;lt;h5&amp;gt;CSS - Layout Hierarchies.&amp;lt;/h5&amp;gt;
&amp;lt;p&amp;gt;Content&amp;lt;/p&amp;gt;

&amp;lt;/div&amp;gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;CSS styling

.parent-child{
width: 750px;
border: 1px solid black;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;With the 750px, the width of the parents will sort of dictate the width of the children, or it can be said that the children are adapting to the parent. &lt;br&gt;
This is different when it comes to the height of the parent. Often times people include a height parameter to the parent.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;CSS styling

.parent-child{
width: 750px;
border: 1px solid black;
height: 450px;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;But, it is expected that the children dictate the height of the parents because the bigger the width the smaller the height and vice versa. This is important because the contents need to be contained regardless of the width of the parent. In other words, the width of the child need to be set as auto.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;CSS styling

.parent-child{
width: 750px;
border: 1px solid black;
}

. parent-child &amp;gt; *{
width: auto;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We will get into the relationship with the siblings as well but let's look at more relationship with the parents.&lt;br&gt;
One of these is 'inheritance'. You can set a color on the parent and all the children/individual elements will inherit it specifically.&lt;/p&gt;

&lt;p&gt;Another thing that gives people tough time is the relationship of margin. Understanding collapsing-margin is part of understanding relationships. The two options that solves the margin problem is the 'display:grid' or 'display:flow-root'. Another way is to set 'padding:block'.&lt;/p&gt;

&lt;p&gt;When you look at the relationship between contents, which can be referred to as siblings, the relationship get more complicated when the contents are not the same. For example; when a div or an element has two contents. And one of the contents has an image header and explanation meanwhile the other contents has only a header. Styling this contents or siblings might be frustrating or by itself difficult styling both of them. One way to handle both siblings is to make sure both of them are of the same size. Then align them as flex if you don't want them to stay in column.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;display:flex;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Or you can use the flex 1 option.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;flex:1;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Conclusion&lt;/strong&gt;&lt;br&gt;
Understanding these relationships have a long way to help you deep dive into layouts styling in CSS. Whenever you run into a problem, try and figure out what is influencing things to result in the way they're behaving. There are lots of things going on between relationships of the contents of a page. &lt;/p&gt;

&lt;p&gt;If this content was helpful to you, please like, share and also leave a comment for me. &lt;/p&gt;

&lt;p&gt;You can contact me on &lt;a href="https://www.linkedin.com/in/samuel500"&gt;LinkedIn&lt;/a&gt;, &lt;a href="https://mobile.twitter.com/Sam_Chinaza"&gt;Twitter&lt;/a&gt;, or checkout my &lt;a href="https://github.com/Smlchinaza/"&gt;GitHub&lt;/a&gt; profile. &lt;/p&gt;

</description>
      <category>webdev</category>
      <category>css</category>
      <category>programming</category>
      <category>beginners</category>
    </item>
    <item>
      <title>50 Keyboard Shortcuts that will make you a Visual Studio Code Pro.</title>
      <dc:creator>Chukwuemeka, Samuel Chinaza</dc:creator>
      <pubDate>Wed, 08 Feb 2023 09:55:46 +0000</pubDate>
      <link>https://dev.to/smlchinaza/50-keyboard-shortcuts-that-will-make-you-a-visual-studio-code-pro-2p3b</link>
      <guid>https://dev.to/smlchinaza/50-keyboard-shortcuts-that-will-make-you-a-visual-studio-code-pro-2p3b</guid>
      <description>&lt;p&gt;Visual studio code (VS Code) is one of the most popular IDE and text editor that most software developers use. It provides support for many languages and frameworks. And it's open source and free to use. &lt;/p&gt;

&lt;p&gt;This article contains 50 Keyboard Shortcuts that every developer need to know for easy programming. It'll help you save time and and make using Vs Code easy for you. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Shortcuts and what they do.&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;code&gt;ctrl&lt;/code&gt;+ &lt;code&gt;N&lt;/code&gt;: Open a new file.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;Ctrl&lt;/code&gt; + &lt;code&gt;S&lt;/code&gt;: Save file.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;Ctrl&lt;/code&gt; + &lt;code&gt;Shift&lt;/code&gt; + &lt;code&gt;S&lt;/code&gt; : Save as. &lt;/li&gt;
&lt;li&gt;
&lt;code&gt;Ctrl&lt;/code&gt;+ &lt;code&gt;X&lt;/code&gt;: Cut line. &lt;/li&gt;
&lt;li&gt;
&lt;code&gt;Ctrl&lt;/code&gt; + &lt;code&gt;C&lt;/code&gt;: Copy line. &lt;/li&gt;
&lt;li&gt;
&lt;code&gt;Ctrl&lt;/code&gt; + &lt;code&gt;F4&lt;/code&gt;: Close file. &lt;/li&gt;
&lt;li&gt;
&lt;code&gt;Ctrl&lt;/code&gt; + &lt;code&gt;K&lt;/code&gt; then &lt;code&gt;Ctrl&lt;/code&gt; + &lt;code&gt;W&lt;/code&gt;: Close all. &lt;/li&gt;
&lt;li&gt;
&lt;code&gt;Ctrl&lt;/code&gt; + &lt;code&gt;Shift&lt;/code&gt; + &lt;code&gt;T&lt;/code&gt;: Reopen closed editor. &lt;/li&gt;
&lt;li&gt;
&lt;code&gt;Ctrl&lt;/code&gt; + &lt;code&gt;Enter&lt;/code&gt;: Insert new line or Insert line below. &lt;/li&gt;
&lt;li&gt;
&lt;code&gt;Ctrl&lt;/code&gt; + &lt;code&gt;Shift&lt;/code&gt; + &lt;code&gt;Enter&lt;/code&gt;: Insert line above. &lt;/li&gt;
&lt;li&gt;
&lt;code&gt;Ctrl&lt;/code&gt; + &lt;code&gt;Shift&lt;/code&gt; + &lt;code&gt;N&lt;/code&gt;: New window/Instance. &lt;/li&gt;
&lt;li&gt;
&lt;code&gt;Ctrl&lt;/code&gt; + &lt;code&gt;Shift&lt;/code&gt; + &lt;code&gt;W&lt;/code&gt;: Close window/instance. &lt;/li&gt;
&lt;li&gt;
&lt;code&gt;Ctrl&lt;/code&gt; + &lt;code&gt;K&lt;/code&gt; then &lt;code&gt;P&lt;/code&gt;: Copy path of active file. &lt;/li&gt;
&lt;li&gt;
&lt;code&gt;Ctrl&lt;/code&gt; + &lt;code&gt;Home&lt;/code&gt;: Go to beginning of file. &lt;/li&gt;
&lt;li&gt;
&lt;code&gt;Ctrl&lt;/code&gt; + &lt;code&gt;End&lt;/code&gt;: Go to end of file. &lt;/li&gt;
&lt;li&gt;
&lt;code&gt;Home&lt;/code&gt;: Go to beginning of line. &lt;/li&gt;
&lt;li&gt;
&lt;code&gt;End&lt;/code&gt;: Go to end of line. &lt;/li&gt;
&lt;li&gt;
&lt;code&gt;Ctrl&lt;/code&gt; + &lt;code&gt;K&lt;/code&gt; then &lt;code&gt;Ctrl&lt;/code&gt; + &lt;code&gt;C&lt;/code&gt;: Add line comment. &lt;/li&gt;
&lt;li&gt;
&lt;code&gt;Ctrl&lt;/code&gt; + &lt;code&gt;K&lt;/code&gt; then &lt;code&gt;Ctrl&lt;/code&gt; + &lt;code&gt;U&lt;/code&gt;: Remove line comment. &lt;/li&gt;
&lt;li&gt;
&lt;code&gt;Ctrl&lt;/code&gt; + &lt;code&gt;/&lt;/code&gt;: Toggle line comment. &lt;/li&gt;
&lt;li&gt;
&lt;code&gt;Shift&lt;/code&gt; + &lt;code&gt;Alt&lt;/code&gt; + &lt;code&gt;A&lt;/code&gt;: Toggle block comment. &lt;/li&gt;
&lt;li&gt;
&lt;code&gt;Ctrl&lt;/code&gt; + &lt;code&gt;T&lt;/code&gt;: Show all symbols. &lt;/li&gt;
&lt;li&gt;
&lt;code&gt;Ctrl&lt;/code&gt; + &lt;code&gt;G&lt;/code&gt;: Go to line. &lt;/li&gt;
&lt;li&gt;
&lt;code&gt;Ctrl&lt;/code&gt; + &lt;code&gt;P&lt;/code&gt;: Go to file. &lt;/li&gt;
&lt;li&gt;
&lt;code&gt;Ctrl&lt;/code&gt; + &lt;code&gt;F&lt;/code&gt;: Find. &lt;/li&gt;
&lt;li&gt;
&lt;code&gt;Ctrl&lt;/code&gt; + &lt;code&gt;H&lt;/code&gt;: Replace. &lt;/li&gt;
&lt;li&gt;
&lt;code&gt;Ctrl&lt;/code&gt; + &lt;code&gt;Spacebar&lt;/code&gt;: Trigger suggestion. &lt;/li&gt;
&lt;li&gt;
&lt;code&gt;Ctrl&lt;/code&gt; + &lt;code&gt;.&lt;/code&gt;: Quick fix. &lt;/li&gt;
&lt;li&gt;
&lt;code&gt;Ctrl&lt;/code&gt; + &lt;code&gt;K&lt;/code&gt; then &lt;code&gt;M&lt;/code&gt;: Change file language. &lt;/li&gt;
&lt;li&gt;
&lt;code&gt;Ctrl&lt;/code&gt; + &lt;code&gt;=&lt;/code&gt;: Zoom in. &lt;/li&gt;
&lt;li&gt;
&lt;code&gt;Ctrl&lt;/code&gt; + &lt;code&gt;-&lt;/code&gt;: Zoom out. &lt;/li&gt;
&lt;li&gt;
&lt;code&gt;Ctrl&lt;/code&gt; + &lt;code&gt;F4&lt;/code&gt; then &lt;code&gt;Ctrl&lt;/code&gt; + &lt;code&gt;W&lt;/code&gt;: Close editor. &lt;/li&gt;
&lt;li&gt;
&lt;code&gt;Ctrl&lt;/code&gt; + &lt;code&gt;Shift&lt;/code&gt; + &lt;code&gt;.&lt;/code&gt;: Replace with next value. &lt;/li&gt;
&lt;li&gt;
&lt;code&gt;Ctrl&lt;/code&gt; + &lt;code&gt;Shift&lt;/code&gt; + &lt;code&gt;/&lt;/code&gt;: Replace with previous value. &lt;/li&gt;
&lt;li&gt;
&lt;code&gt;Ctrl&lt;/code&gt; + &lt;code&gt;K&lt;/code&gt; then &lt;code&gt;F&lt;/code&gt;: Close folder. &lt;/li&gt;
&lt;li&gt;
&lt;code&gt;Ctrl&lt;/code&gt; + &lt;code&gt;\&lt;/code&gt;: Split folder. &lt;/li&gt;
&lt;li&gt;
&lt;code&gt;Ctrl&lt;/code&gt; + &lt;code&gt;Shift&lt;/code&gt; + &lt;code&gt;\&lt;/code&gt;: Jump to matching bracket. &lt;/li&gt;
&lt;li&gt;
&lt;code&gt;Shift&lt;/code&gt; + &lt;code&gt;F8&lt;/code&gt;: Go to previous error/warning. &lt;/li&gt;
&lt;li&gt;
&lt;code&gt;Alt&lt;/code&gt; + &lt;code&gt;Right arrow&lt;/code&gt;: Go forward. &lt;/li&gt;
&lt;li&gt;
&lt;code&gt;Alt&lt;/code&gt; + &lt;code&gt;Left arrow&lt;/code&gt;: Go back. &lt;/li&gt;
&lt;li&gt;
&lt;code&gt;Alt&lt;/code&gt; + &lt;code&gt;Enter&lt;/code&gt;: Select all occurrences to find match. &lt;/li&gt;
&lt;li&gt;
&lt;code&gt;Alt&lt;/code&gt; + &lt;code&gt;Up arrow&lt;/code&gt;: Move line up. &lt;/li&gt;
&lt;li&gt;
&lt;code&gt;Alt&lt;/code&gt; + &lt;code&gt;Down arrow&lt;/code&gt;: Move line down. &lt;/li&gt;
&lt;li&gt;
&lt;code&gt;Shift&lt;/code&gt; + &lt;code&gt;Alt&lt;/code&gt; + &lt;code&gt;Up arrow&lt;/code&gt;: Copy line up. &lt;/li&gt;
&lt;li&gt;
&lt;code&gt;Shift&lt;/code&gt; + &lt;code&gt;Alt&lt;/code&gt; + &lt;code&gt;Down arrow&lt;/code&gt;: Copy line down. &lt;/li&gt;
&lt;li&gt;
&lt;code&gt;F12&lt;/code&gt;: Go to definition. &lt;/li&gt;
&lt;li&gt;
&lt;code&gt;F11&lt;/code&gt;: Toggle screen. &lt;/li&gt;
&lt;li&gt;
&lt;code&gt;F2&lt;/code&gt;: Rename symbol. &lt;/li&gt;
&lt;li&gt;
&lt;code&gt;Tab&lt;/code&gt;: Emmet expand. &lt;/li&gt;
&lt;li&gt;
&lt;code&gt;F8&lt;/code&gt;: Go to next error/warning. &lt;/li&gt;
&lt;/ol&gt;

</description>
    </item>
  </channel>
</rss>
