Thursday, January 30, 2014

Web Page Ruler

On this project I work a lot with QA counting every pixel in my css-file. To finish my project I had to add new Chrome extension. It's a quite good and practical tool for Front-End Development. I hope, everybody will use this extension.

In addition I found a very good tool to compress HTML online. He it is: http://www.textfixer.com/html/compress-html-compression.php This site features more useful tools and tricks, which I will use in a future.

Tuesday, January 14, 2014

Horizontal and Vertical Menu

One HTML code, which will serve desktop, tablet and mobile views.



HTML:
 <nav>
           <div class="col-xs-12 col-sm-12 col-md-12" id="navigation">
                <ul>
                    <li><a href="#">Home</a></li>
                    <li><a href="#">About Us</a></li>
                    <li><a href="#">FAQ</a></li>
                </ul>
            </div><!-- navigation  -->
    </nav>
CSS:
header, nav {
    width: 976px;
    margin-left: auto;
    margin-right: auto;
}

nav {
    height: 130px;
}

#navigation ul
{
    margin: 0;
    padding-top: 15px;
    display: block;
    padding-bottom: 15px;
    height: 40px;
}

#navigation ul li
{
    list-style-type: none;
    display: inline;
}

#navigation li:before {
content: " | ";
padding-left: 30px;
padding-right: 30px;
color: white;
}

#navigation li:first-child:before {
content: none;
}

#navigation ul  {
    background-color: #6FB4D3;
}

#navigation li a {
    color: white;
 }

#navigation li a:hover {
    color: #000066;
    text-decoration: none;
}

Media -query:

@media screen and (max-width : 480px)
{
 #navigation ul li
    {
        display: block;
        list-style-type: none;
        height: 40px;
        width: 300px;
        padding-top: 15px;
        padding-bottom: 15px;
        margin: 0;
        text-align: center;
        border: solid 2px #FFFFFF; 
    }

    #navigation li:before { content: none;}
    #navigation li:first-child:before { content: none; }
 
#navigation ul  {
    background-color: #FFFFFF;
  }

  #navigation ul li  {
    background-color: #6FB4D3;
    }
  
  #navigation ul li
    {
         background-color: #6FB4D3; 
    }  

  #navigation li a {
    color: white;
    }

    #navigation li a:hover {
        color: #000066;
        text-decoration: none;
    }
}