<?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 Larissa Avila on Medium]]></title>
        <description><![CDATA[Stories by Larissa Avila on Medium]]></description>
        <link>https://medium.com/@Lariicsa?source=rss-5add5974049d------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*qgi8fzyqYDHVZF_6y3dUJg.jpeg</url>
            <title>Stories by Larissa Avila on Medium</title>
            <link>https://medium.com/@Lariicsa?source=rss-5add5974049d------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 01 Dec 2026 07:34:40 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@Lariicsa/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[Common CSS mistakes developers ignore]]></title>
            <link>https://medium.com/@Lariicsa/common-css-mistakes-developers-ignore-17cfb5ac9d2f?source=rss-5add5974049d------2</link>
            <guid isPermaLink="false">https://medium.com/p/17cfb5ac9d2f</guid>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[developer]]></category>
            <category><![CDATA[html]]></category>
            <category><![CDATA[good-practices]]></category>
            <category><![CDATA[css]]></category>
            <dc:creator><![CDATA[Larissa Avila]]></dc:creator>
            <pubDate>Mon, 14 Nov 2016 06:31:37 GMT</pubDate>
            <atom:updated>2016-12-10T03:54:57.695Z</atom:updated>
            <content:encoded><![CDATA[<p>This is a real story about how I found a lot of little but significant mistakes in web development.</p><p>First of all, you should know, if you started developing on back-end or mobile, is very common to trip on that kind of mistakes.</p><p>So, let’s start with a few but useful tips:</p><h3><strong>1.- Use <em>Inline Element </em>as a main container</strong></h3><p>Well, if you didn’t know, there are two different kind of HTML elements: <strong>block</strong> and <strong>inline.</strong></p><p><strong>Block </strong>elements are commonly main containers, its behaviour is like parent container and its flow is independent of the others. Elements like <strong>Div</strong>(most famous), <strong>ul, h1, h2, h3 </strong>and<strong> </strong>all other header tags, <strong>aside, form, </strong>etc,<strong> </strong>are used frequently in web development. Have default property <strong><em>display: block.</em></strong></p><p><strong>Inline </strong>elements follow the general flow and don’t influence in general structure, elements like <strong>span, li, a, label, </strong>etc are used inside of block elements an it behavior is like children elements. Have default property <strong><em>display: inline.</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/560/1*TZ-kMHR0HpUwESYQhIaz1Q.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/560/1*enLrH-k605onKlxEmHev0w.png" /><figcaption>inline and block HTML elements, correct way to use them.</figcaption></figure><p>Maybe some times you need to use block inside of a inline element, like in a clickable figure, you can use it, but remember to convert inline element in a block element with property <strong><em>display:block.</em></strong></p><p>And maybe you’re wondering <strong><em>¿But why I shouldn’t use block inside a inline element? ¿Does my browser could explode ?<br></em></strong>No. But you should use it because is a good practice and in older (and inconsistent) browsers doesn’t parse correctly.</p><h3><strong>2.- Medias queries confusing about max and min width (or height)</strong></h3><p>This mistake often happen to developers that don’t have experience with DOM. Not more confusing, just remember:</p><p><em>@media only </em><strong><em>screen</em></strong><em> and (max-width: 500px)</em> = <strong>screen &lt; </strong>500px<strong><br></strong>conversely<br><em>@media only </em><strong><em>screen</em></strong><em> and (min-width: 500px)</em> = <strong>screen &gt; </strong>500px</p><p>and that’s all.</p><h3><strong>3.- Same classes in different menu levels</strong></h3><p>I going to start with this image</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/560/1*ooTyYNif8O5i_pL3we-WpQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/560/1*Pyxej-b-VrwX9uvuzpWs1A.png" /><figcaption>Parent and child menus example</figcaption></figure><p>Maybe to “<em>save lines</em>” or “<em>not repeat</em>”, you decided use same class in two same elements but forgetting that the context is different.<br>Above the <em>menu</em> example, shows that you can use the same class, but you shouldn’t, because you have to handle separately. Parent menu has the main behavior and submenus have totally different, specially if you are working in a big component.</p><h3>4.- Not using CSS reset</h3><p>Each browser uses its own default style in HTML elements.<br>So you need a special sheet to reset properties, some files like <a href="https://necolas.github.io/normalize.css/"><strong>Normalize</strong></a><strong> </strong>or <a href="http://cssreset.com/"><strong>CSSreset</strong></a><strong> </strong>, although some people use to put the universal and easy reset <br><strong><em>* { margin:0; padding:0; }<br></em></strong>When you reset styles you can manipulate elements like if you were making element from zero.</p><h3><strong>5.- Use CSS3 properties as if all browsers support them</strong></h3><p><strong>First tip</strong>: if want to use all the new sophisticated css3 properties, you must have an idea of your target users’ browsers, you should take a look to some <a href="http://caniuse.com/"><strong>accepted rules in each browser </strong></a><strong>.</strong>.</p><p><strong>Second tip</strong>: One day I started using flexbox, everything was hunky-dory, I was testing my code in Chrome, Safari, Android, even in Internet Explorer.</p><p>But some day, IE9 and Android 4 browser came back and broke all my beauty lines and components. So a friend and team colleague (<a href="http://twitter.com/ragrum"><strong>José</strong></a>)saved the day with all necessaries vendors to run in all browsers. And this is a #TrueStory<br>Lesson: to use CSS3 use all <a href="https://github.com/postcss/autoprefixer"><em>acceptable and necessary vendors</em></a>.</p><p><strong>Third tip</strong>: You should provide a different sheet for styles in old browsers, because they don’t support the cutest and coolest CSS3 styles, so you need to create alternative ones.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=17cfb5ac9d2f" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>