<?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: Corina Pip</title>
    <description>The latest articles on DEV Community by Corina Pip (@imalittletester).</description>
    <link>https://dev.to/imalittletester</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%2F118870%2F67ade4ee-624e-4d84-a7e6-31c59a05c9e1.jpg</url>
      <title>DEV Community: Corina Pip</title>
      <link>https://dev.to/imalittletester</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/imalittletester"/>
    <language>en</language>
    <item>
      <title>Style beautiful web pages without writing any CSS. Using W3.CSS.</title>
      <dc:creator>Corina Pip</dc:creator>
      <pubDate>Sat, 08 Dec 2018 20:43:43 +0000</pubDate>
      <link>https://dev.to/imalittletester/style-beautiful-web-pages-without-writing-any-css-using-w3css-45ee</link>
      <guid>https://dev.to/imalittletester/style-beautiful-web-pages-without-writing-any-css-using-w3css-45ee</guid>
      <description>&lt;p&gt;Recently i was looking for a way to create some web pages to use in my upcoming technical workshops as demo pages. I did not want to spend too much time styling them, but at the same time i wanted them to look nice and modern. Using CSS at this point was out of the question, since that would have been too much effort for what i wanted to create. I stumbled on something that fit perfectly with my wishes, namely W3.CSS. &lt;br&gt;
W3.CSS is a modern, easy to learn CSS framework, that allows for responsiveness and works across a variety of browsers and platforms.&lt;/p&gt;
&lt;h1&gt;
  
  
  Using it in your project
&lt;/h1&gt;

&lt;p&gt;In order to style pages using this framework, you only need to import it by adding the following entry in your HTML page:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight xml"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;link&lt;/span&gt; &lt;span class="na"&gt;rel=&lt;/span&gt;&lt;span class="s"&gt;"stylesheet"&lt;/span&gt; &lt;span class="na"&gt;href=&lt;/span&gt;&lt;span class="s"&gt;"https://www.w3schools.com/w3css/4/w3.css"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;h1&gt;
  
  
  OK, but what can you style?
&lt;/h1&gt;

&lt;p&gt;To get an overall idea of what this framework offers, you can checkout their &lt;a href="https://www.w3schools.com/w3css/w3css_intro.asp"&gt;intro page&lt;/a&gt;. You can style buttons, navigation bars, dropdowns and lists, just to name a few. You can also apply predefined colors, or apply color tone effects on images. And of course you can easily apply padding or margins, or even set a layout on the page that will help items fall into the right place. Or left place, if you want.&lt;/p&gt;

&lt;h1&gt;
  
  
  Hmmm, interesting, but how?
&lt;/h1&gt;

&lt;p&gt;The summary of it is: to any HTML element that you want to style, you need to add a class attribute. The values of the class attributes will determine the styling. For example, to add a predefined color to an element, like cyan, the element's class needs to be "w3-cyan". To add a simple border, you need to add the "w3-border" class. Checkout the &lt;a href="https://www.w3schools.com/w3css/default.asp"&gt;"W3.CSS" site&lt;/a&gt; for all these values and all the possible styling you can apply.&lt;/p&gt;

&lt;h1&gt;
  
  
  What about the cover image of this article?
&lt;/h1&gt;

&lt;p&gt;Ah yes. This image uses only "W3.CSS" for styling, just to give you a taste of this framework.&lt;br&gt;&lt;br&gt;
Let me tell you what i used to create it. The button (on the left) and the image (on the right, together with the text below it) are placed in a &lt;em&gt;div&lt;/em&gt; element that looks like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight xml"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"w3-display-middle w3-container w3-border-top w3-border-bottom w3-margin w3-border-teal"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;This means: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;em&gt;w3-display-middle&lt;/em&gt; - the element will be placed in the middle of the page. Elements can be displayed: top left, top middle, top right, left, middle, right or bottom left, bottom middle and bottom right. &lt;/li&gt;
&lt;li&gt;
&lt;em&gt;w3-container&lt;/em&gt; - an element with a left and right padding of 16px to any other element.&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;w3-border-top&lt;/em&gt; and &lt;em&gt;w3-border-bottom&lt;/em&gt; - add the top and lower borders. The color of the border, teal, is given by &lt;em&gt;w3-border-teal&lt;/em&gt;. You could also create round borders, or thick ones.&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;w3-margin&lt;/em&gt; - adds a 16px margin to all sides of this container.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The button on the left, inside the container, has the following HTML code:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight xml"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;button&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"w3-btn w3-border w3-teal w3-margin w3-padding-large w3-left w3-large w3-opacity"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Who's
        stylish?&lt;span class="nt"&gt;&amp;lt;/button&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Let's see what this all means:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;em&gt;w3-btn&lt;/em&gt; - creates a rectangular button, that, when hovered, shows a nice shadow. &lt;/li&gt;
&lt;li&gt;
&lt;em&gt;w3-border&lt;/em&gt; - provides a thin border to the button.&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;w3-teal&lt;/em&gt; - sets the button color to teal. See 'Colors' for other available colors.&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;w3-left&lt;/em&gt; - is the equivalent of &lt;em&gt;float:left&lt;/em&gt; from CSS.&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;w3-large&lt;/em&gt; - specifies that the buttons' text is larger than the default size of text.&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;w3-opacity&lt;/em&gt; - gives a transparency effect to the button. See 'Effects' for further details and other values. &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Now, for the right side, where the image is:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight xml"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"w3-card-4 w3-border w3-left w3-padding-large w3-margin w3-teal"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;img&lt;/span&gt; &lt;span class="na"&gt;src=&lt;/span&gt;&lt;span class="s"&gt;"https://farm2.staticflickr.com/1870/44322750771_d9eb2522f8_n.jpg"&lt;/span&gt;
             &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"w3-sepia-min w3-round-xlarge"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"w3-container w3-center"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;h4&amp;gt;&amp;lt;b&amp;gt;&lt;/span&gt;We are. Yes we are.&lt;span class="nt"&gt;&amp;lt;/b&amp;gt;&amp;lt;/h4&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;As you can see, the image (an &lt;em&gt;img&lt;/em&gt; tag) and the text below it are placed inside a styled &lt;em&gt;div&lt;/em&gt;. The attribute that defines what this &lt;em&gt;div&lt;/em&gt; does is &lt;em&gt;w3-card-4&lt;/em&gt;. It specifies that the &lt;em&gt;div&lt;/em&gt; is a sort of a container (it is used mostly to create 'paper card'-like containers), with a shadow border of 4px. The card &lt;em&gt;div&lt;/em&gt; element also has a border, float location, padding, margin and background color specified (which i already described in the above elements).&lt;/p&gt;

&lt;p&gt;The image is styled with two attributes: there is a Sepia color effect applied on it, which is given by the &lt;em&gt;w3-sepia-min&lt;/em&gt; attribute, and its' corners are rounded quite a bit as per the &lt;em&gt;w3-round-xlarge&lt;/em&gt; attribute.&lt;/p&gt;

&lt;p&gt;For the text displayed right below the image, another &lt;em&gt;div&lt;/em&gt; element is created to encompass it, of type &lt;em&gt;w3-container&lt;/em&gt;. The attribute &lt;em&gt;w3-center&lt;/em&gt; specifies that all the text from inside the &lt;em&gt;div&lt;/em&gt; will be displayed in a centered position relative to the &lt;em&gt;div&lt;/em&gt;. The text itself is then only a bolded &lt;em&gt;h4&lt;/em&gt; one.&lt;/p&gt;

&lt;p&gt;Confused already? Don't hesitate to check out the &lt;a href="https://www.w3schools.com/w3css/default.asp"&gt;W3.CSS site&lt;/a&gt; for all the details and the options they offer for easily creating stylish web pages.&lt;/p&gt;

</description>
      <category>css</category>
      <category>w3css</category>
      <category>html</category>
      <category>style</category>
    </item>
  </channel>
</rss>
