Pages

Showing posts with label HTML5. Show all posts
Showing posts with label HTML5. Show all posts

Friday, May 23, 2014

Advanced CSS Menu Trick originate


What we wish to try to to here, is rather than merely sterilization the state of the navigation item the user is presently rolling over, we wish to change the non navigation things similarly. this may facilitate focus the users attention on the item they need elect on, and make a brand new look and grieve the location overall. wish to examine it in action? cross-check my demo page before we have a tendency to begin.

The first step – CSS roll overs

The first step of the sport is building some CSS roll overs. we wish to stay things accessible thus I actually have opted to use Associate in Nursing IR technique. basically we have a tendency to produce a picture that has each the static, active and rolled over state all lined up next to every different. we have a tendency to then set the image because the background of the component, however the breadth is simply wide enough for one state of the image (so if the button image is 600px wide with all 3 states, we have a tendency to build the navigation component as a 200px wide button). we have a tendency to then set the text indent very high and overflow to hidden in order that it pushes the text out of the box. Then we have a tendency to solely see the image despite the fact that there's still hypertext markup language text on the page for search engines and accessibility.

The CSS

#main_nav { list-style: none; margin: 0; padding: 0; }
#main_nav li { float: left; }
#main_nav li a { text-indent: -999999px; overflow: hidden; display: block; height: 72px; } 

#home { background: url(../images/navigation/home.gif); width: 103px; }
#home.active { background: url../images/navigation/home.gif) -103px 0; } 
 

 The HTML

<ul id="main_nav">
   <li><a href="index.html" accesskey="3" id="home" title="Home Page">Home Page</a></li>
   <li><a href="about-us.html" accesskey="4" id="about" title="About 3.7 Designs">About Us</a></li>
   <li><a href="web-design.html" accesskey="5" id="webdesign" class="active" title="Web Design and Development">Web Design</a></li>
   <li><a href="graphic-design.html" accesskey="6" title="Graphic Design and Marketing" id="graphicdesign">Graphic Designs</a></li>
   <li><a href="keyword-optimization/michigan-seo.html" accesskey="7" title="Search Engine Optimization and Marketing" id="seo">Search Engine Optimization SEO</a></li>
   <li><a href="ann-arbor-marketing.html" accesskey="8" id="contact" title="Contact Us">Contact Us</a></li>
  </ul> 
 
Then {when we have a tendency to|once we|after we} wish to vary the state of the button we merely modify the background position to be -200px (or the dimensions of the button itself) actuation the various state of the button into read. the rationale for doing it this manner then merely swapping pictures, is that the latter methodology tends to form a flicker in some browsers.

At now the general public have it set in order that if Associate in Nursing item is hovered on (#home for example) it switches the background-image position. This creates the quality run of the mill css roll over. but we wish to try to to one thing else, one thing a lot of distinctive. we wish to own each roll over item on the menu amendment except the one you're hovering on. this needs a little CSS trickery!

IE7, Safari, Firefox, all support the :hover pseudo selectors thus let’s profit of that. What we'd like to try to to is have all the menu things amendment the background-image position once the menu item itself has been rolled over. Then the item that's hovered on is ready to own the background-position: 0px to stay it from moving once the remainder do.

The CSS

 #main_nav:hover li a#webdesign { background-position: -280px; }
 #main_nav:hover li a#home { background-position: -206px; }
 #main_nav:hover li a#graphicdesign { background-position: -340px; }
 #main_nav:hover li a#contact { background-position: -232px; }
 #main_nav:hover li a#about { background-position: -242px; }
 #main_nav:hover li a#seo { background-position: -540px; 

This pulls every menu item’s background position back once any of #main_nave has been hovered on. currently all we've got to try to to is ready the hovered things to own a background-position of 0

#home { background: url(../images/navigation/home.gif); width: 103px; }
 #home:hover { background: url(../images/navigation/home.gif) 0 0 !important; }

The HTML5  is set, already coded! currently you're able to rock and roll apart from that plagiary IE5.5+. fortuitously there has been a behavior file developed referred to as shoveler.ht c that may fix this issue. merely transfer it, and duplicate Associate in Nursing d paste the subsequent code into an IE5+ specific sheet.

Bubbler – CSS discourse bubble Generator


This is a trifle CSS speech bubble generator that I started a trifle whereas past (read ‘about a year’) and engineered with some J Query UI elements and a fairly hefty quantity of JavaScript. I’ve been tomfoolery with it latterly and have created it behave properly in a very ton additional things. sadly, round the same time that I started creating this I conjointly started fiddling with ‘magnifying’ my code. to chop a protracted story short, I lost the first “expanded” version of the speech bubble generator and had to form all my modifications to the hardly decipherable version :( *update* I’ve spent a while hunting and manually increasing the code for the speech bubble generator! this implies I will currently do bug fixes and different enhancements :D i assume I’ll simply ought to be additional careful in future :D

Anyway, plow ahead and create yourself some CSS speech bubbles! {they simply|they only|they merely|they simply|they solely} break out just one HTML5 tag, and therefore the CSS3 that gets generated is accessible from the pull down tab on the highest right.

Monday, May 19, 2014

CSS Layout Inventor | CSS architect


About the CSS Layout Generator

The CSS Layout Generator was 1st free by Tony Arlette in Gregorian calendar month 2003, since then over 871,000 layouts are generated. Updated in Gregorian calendar month 2010, HTML5 doc type will currently be designated and a straightforward HTML5 model with applicable tags are created. different hypertext mark-up language and XHT

The generator helps you produce the structure of your web site model victimization valid HTML and CSS.

You can produce a fluid or fastened breadth floated column layout, with up to three columns and with header and footer. Values is laid out in either pixels, ems or percentages.

The generator needs a contemporary DOM capable browser with JavaScript enabled.
Instructions

To create your layout choose the structural parts your web site needs (header, footer, columns). Then specify a size within the field provided and opt for a background color from the color someone below.

Info popups square measure out there wherever you see   icon, simply hover over it for additional data.

Join the CSS Forum to recommend changes or kindle facilitate wherever required.
ML doc types square measure still out there.

CSS3 set seascape two picture




Welcome to the CSS3_seascape_two example

This straightforward, fastened breadth web site example is free beneath a resourceful Commons Attribution three.0 License. this suggests you're absolve to transfer and use it for private and industrial comes. However, you need to leave the 'design from css3 templates.co.UK' link within the footer of the example.

This example is written entirely in HTML5 and CSS3. The photos shown during this example were taken by Pine Tree State. you'll be able to read a lot of free CSS3 internet templates here.

This example could be a absolutely documented five page web site, with associate examples page that offers samples of all the designs accessible with this style. there's additionally a operating PHP contact kind on the contact page. All of the seascapes were taken by Pine Tree State - use as you want.

Thursday, May 15, 2014

The Page Turn Transitions with CSS3

In the previous couple of years, we have seen lots of single page websites lying round the net, most of them exploitation JavaScript for a few transitions impact. Well, currently i am gonna teach you the way you'll have your own, however instead i will be exploitation CSS Transitions and also the :target property to try and do all the magic.
In the previous couple of years, we’ve seen lots of single page websites lying round the net, most of them exploitation JavaScript for a few transitions impact. Well, currently I’m gonna teach you the way you'll have your own, however instead I’ll be exploitation CSS3 Transitions and also the :target property to try and do all the magic.

Markup

The HTML5 can contain 5 main divisions: a header and also the four content sections. every of the content sections goes to own associate degree ID and also the category panel. Moreover, we are going to add another division within which is able to have the category content. the primary content section that is #home can solely have the content category and can not need an additional division:


<!-- Home -->
<div id="home" class="content">
    <h2>Home</h2>
    <p>Some content</p>
    <!-- ... -->
</div>
<!-- /Home -->
 
<!-- Portfolio -->
<div id="portfolio" class="panel">
    <div class="content">
        <h2>Portfolio</h2>
        <p>Some content</p>
        <!-- ... -->
    </div>
</div>
<!-- /Portfolio -->
 
<!-- About -->
<div id="about" class="panel">
    <div class="content">
        <h2>About</h2>
        <p>Some content</p>
        <!-- ... -->
    </div>
</div>
<!-- /About -->
 
<!-- Contact -->
<div id="contact" class="panel">
    <div class="content">
        <h2>Contact</h2>
        <p>Some content</p>
        <!-- ... -->
    </div>
</div>
<!-- /Contact -->

In the header we are going to have the most heading and also the navigation:

<!-- Header with Navigation -->
<div id="header">
    <h1>Page Transitions with CSS3</h1>
    <ul id="navigation">
        <li><a id="link-home" href="#home">Home</a></li>
        <li><a id="link-portfolio" href="#portfolio">Portfolio</a></li>
        <li><a id="link-about" href="#about">About Me</a></li>
        <li><a id="link-contact" href="#contact">Contact</a></li>
    </ul>
</div>
 
Now, the most plan is to use the pseudo-class :target so as to feature a transition to this section. during this CSS example, we are going to be slippery  up and down our sections.

CSS

First we are going to provide vogue to our header and also the navigation. we wish to stay these on an equivalent spot the least bit the time, despite the fact that everything else are moving.

#header{
    position: absolute;
    z-index: 2000;
    width: 235px;
    top: 50px;
}
#header h1{
    font-size: 30px;
    font-weight: 400;
    text-transform: uppercase;
    color: rgba(255,255,255,0.8);
    text-shadow: 0px 1px 1px rgba(0,0,0,0.4);
    padding: 40px;
    background: #000;
}
#navigation {
    margin-top: 30px;
    width: 235px;
    display:block;
    list-style:none;
    z-index:3;
}
#navigation a{
    color: #444;
    display: block;
    background: #fff;
    background: rgba(255,255,255,0.9);
    line-height: 50px;
    padding: 0px 20px;
    text-transform: uppercase;
    margin-bottom: 6px;
    box-shadow: 1px 1px 2px rgba(0,0,0,0.2);
    font-size: 14px;
}
#navigation a:hover {
    background: #ddd;
}
  
In order to vary the color of this item within the navigation, we’ll use the :target pseudo-class with the final relative selector to “get to” the various navigation item:

#home:target ~ #header #navigation #link-home,
#portfolio:target ~ #header #navigation #link-portfolio,
#about:target ~ #header #navigation #link-about,
#contact:target ~ #header #navigation #link-contact{
    background: #000;
    color: #fff;
}

And that’s all you would like. check up on the demos and you’ll see alternative samples of however you'll try this.

Hope you likeable this tutorial and perhaps you'll experiment together with your own effects.

Wednesday, May 14, 2014

Creating an Impressive Product glass case with CSS3

impress.js could be a tiny, standalone library that produces it simple to style advanced CSS3 shows with attention-getting effects. however what if we tend to used impress.js for one thing aside from a presentation? this is often what we tend to do these days – we'll be spicing up a lucid recent product page with some CSS3 magic!

Using impress.js


With this little library, we will produce swish CSS3 transitions between the slides of our showcase. To do this, we've got to instruct impress.js on the way to orient the slides. this is often simple to try to to – we'll use knowledge attributes on the step dives. These attributes are translated into real CSS3 transformations by the library, reckoning on the present browser, and have an effect on the slide.
Impress.js supports variety of attributes:

    data-x, data-y, data-z can move the slide on the screen in 3D space;
    data-rotate, data-rotate-x, data-rotate-y rotate the part round the such that axis (in degrees);
    data-scale – enlarges or shrinks the slide.

The CSS3

To make the presentation work, we'll got to apply some CSS3 rules. the primary step is to vogue the presentation instrumentation and declare default styling for the slide parts.
assets/css/style.css



/*----------------------------
    Styling the presentation
-----------------------------*/

#impress:not(.impress-not-supported) .step{
    opacity:0.4;
}

#impress .step{
    width:700px;
    height: 600px;
    position:relative;
    margin:0 auto;

    -moz-transition:1s opacity;
    -webkit-transition:1s opacity;
    transition:1s opacity;
}

#impress .step.active{
    opacity:1;
}

#impress h2{
    font: normal 44px/1.5 'PT Sans Narrow', sans-serif;
    color:#444648;
    position:absolute;
    z-index:10;
}

#impress p{
    font: normal 18px/1.3 'Open Sans', sans-serif;
    color:#27333f;
    position:absolute;
    z-index:10;
}

#impress img{
    position:absolute;
    z-index:1;
}

As you'll see within the rules higher than, and within the HTML5 fragment within the starting of this tutorial, the #impress instrumentation is allotted a .impress-not-supported category. the category is removed providing the present browser supports the practicality needed for the library to run with success.

Monday, May 12, 2014

What is HTML5 &CSS Capable ?

After analyzing our new focus here at 1WD, that primarily is teaching new, young, sty leers concerning net design and serving to them improve their skills and to start out within the business, we have a tendency to completed that we actually ought to go as deep as doable into the fundamentals. And whereas we have a tendency to lined several of those already, 2 basic items area unit still missing from the web site, and these 2 area unit in-depth introductions and discussions concerning HTML5 and CSS3. so it's one in all my assignments for ensuing amount to show you concerning these 2 technologies and, after this, to make many CSS tutorials for you. therefore within the next 2 to a few months, I'll cowl aspects of front-end net style, basic cryptography and tutorials concerning them. Buckle up and find able to become higher at coding!