Nicole Henningsen's Blog
Posted At : September 22, 2008 3:30 PM | Posted By : Nicole Henningsen

YUI Library TabView modifying CSS



If you have looked at Yahoo's Tabview UI Library you have probably tried to dig into the CSS a little bit to modify it to meet your design needs. What a task! I have created an example of incorporating your own tabs based off of the sam skin provided by Yahoo. When I first looked at the tabview CSS I thought the 300+ lines of CSS in the file was a bit extreme! I started breaking it down to see what I needed and what I didn't need. This is what I came up with.

The HTML for this is really pretty basic. You will have 3 JS files and 1 CSS file that you will need to include.
yahoo-dom-event.js
element-beta-min.js
tabview-min.js
tabview.css

You can download the zip file for this example here


Now create a new CSS file and copy the css below. Save the file as tabview.css. Again I used the Yahoo sam skin and just removed what I didn't need and added my own images. The images are included in the zip file above.

/*
Copyright (c) 2008, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.net/yui/license.txt
version: 2.5.2
*/


body {font:13px/1.231 arial,helvetica,clean,sans-serif;*font-size:small;*font:x-small;}table {font-size:inherit;font:100%;}pre,code,kbd,samp,tt{font-family:monospace;*font-size:108%;line-height:100%;}
.yui-navset-top
.yui-nav li,.yui-navset


.yui-nav li{
   margin:0 0 0.0em;
}

.yui-nav,.yui-nav li{
   margin:0;
   padding:0;
   list-style:none;
}
.yui-navset li em{
font-style:normal;
}

.yui-navset .yui-content{zoom:1;}

.yui-navset
.yui-nav li{

   display:inline-block;
   display:-moz-inline-stack;
   *display:inline;
   vertical-align:bottom;
   cursor:pointer;
   zoom:1;
}

.yui-nav li{
   display:block;
}

.yui-nav a{
   position:relative;
}

.yui-nav li a{
   display:block;
   display:inline-block;
   vertical-align:bottom;
   zoom:1;
}

.yui-nav li a em{
   display:inline;
}

.yui-skin-sam
.yui-navset
.yui-nav li,
.selected{
   margin:0 0.16em -1px 0;
}

.yui-skin-sam
.yui-navset
.yui-nav a,
.yui-skin-sam
.yui-navset
.yui-navset-top
.yui-nav a{
   background:url(../images/close.jpg);
   background-repeat:no-repeat;
   width:90px;
   height:19px;
   border:none;
   color:#000;
   text-decoration:none;
}

.yui-nav a em{
   border:solid #bdd75b;
   border-width:1px 0 0;
   cursor:hand;
   padding:0.15em .75em;
   left:0;
   right:0;
   bottom:0;
   top:-1px;
   position:relative;
}

.yui-navset
.yui-nav
.selected a,
.selected a:hover{
   background:url(../images/open.jpg);
   width:81px;
   height:19px;
   background-repeat:no-repeat;
   color:#000;
}

.yui-nav a:focus{
   background:url(../images/close.jpg);
   background-repeat:no-repeat;
   width:90px;
   height:18px;
   outline:0;
}

.yui-content{
   background:#ffffff;
   border-left:1px solid #2d70d6;
   border-right:1px solid #2d70d6;
   border-top:1px solid #2d70d6;
   border-bottom:none;
   padding:0.25em 0.5em;
}

.yui-nav a em{
   border:none;
   top:auto;
   }
Now create a new HTML file and ad the code below. The unordered list creates your tabs at the top. If you would like to include more than two tabs simply add another opening and closing li tag below the code for the closed tab. Your content for the tabs will fall within its own div and paragraph tags. So if your adding another tab be sure to add another set of opening and closing div and paragraph tags below the closing div for tab 2s content. You can view the comment lines in the below html for more detail.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<!--The include files can be downloaded in the zip file located above--->
<link rel="stylesheet" type="text/css" href="tabview/tabview.css">
<script type="text/javascript" src="tabview/yahoo-dom-event.js"></script>
<script type="text/javascript" src="tabview/element-beta-min.js"></script>
<script type="text/javascript" src="tabview/tabview-min.js"></script>

<title>Nicole Rutter-YUI Tabview</title>
</head>
   <!---you must have the body class for this to work--->
   <body class="yui-skin-sam">
<!---I included a table because it is easier to span the tabview exactly how I want it--->
<table style="width:250px; margin-left: 20px;">
   <tr>
   <td>
   <!---opening div for tabs--->
   <div id="demo" class="yui-navset">
   <ul class="yui-nav">
<!--- selected is the tab this is currently open--->
<li class="selected"><a href="#tab1"><em>Open</em></a></li>
<li><a href="#tab2"><em>Closed</em></a></li>
<!---this is where you would add another tab -->
</ul>
<!---start of content div--->
<div class="yui-content">
<div>
<p>
                        Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec at urna. Nam id quam ac risus scelerisque malesuada. In hac habitasse platea dictumst.
Suspendisse potenti. Quisque tortor neque, volutpat viverra, hendrerit id, ornare at, ligula. Pellentesque eget metus. Fusce libero dolor, lacinia et,
pulvinar vitae, sollicitudin ut, purus. Ut congue ullamcorper sapien. Donec eu mi id sapien iaculis consequat. Donec eget lectus non nulla adipiscing
fermentum. Aliquam ac lectus et lectus fermentum sodales. Nulla sit amet purus. Sed consectetuer, sem pharetra malesuada commodo, diam odio feugiat augue,
at dictum leo dolor sit amet tellus. Ut porttitor mi interdum ante. Fusce diam sem, aliquam vitae, dictum vitae, mollis vel, libero. In scelerisque,
mauris eget tincidunt facilisis, urna nibh rhoncus nibh, at semper dui quam nec dui.
</p>
</div>   
<div>
<p>
Cras commodo. Cras molestie risus in mauris. Integer urna tellus, pharetra vel, rhoncus at, interdum nec, eros. Fusce quam nisi, porttitor nec, accumsan
vel, adipiscing id, leo. In tristique, lacus quis consectetuer hendrerit, lacus lacus adipiscing est, nec cursus sapien nisl quis erat. Vivamus id urna in
arcu suscipit aliquet. Vestibulum sodales sapien nec dui. Suspendisse augue arcu, tempus aliquet, dapibus at, malesuada sit amet, risus. Ut sodales, nulla
at pretium elementum, tellus ipsum hendrerit felis, quis molestie tortor elit sed odio. Mauris sed dolor vel magna interdum mollis.
</p>
</div>
<!---if you are creating another tab you would need the following code--->
<!---
<div>
   <p>
</p>
</div>
--->

</div><!---end of content div--->
<img src="http://nicole.cfwebtools.com/images/tabBottom.jpg"/>
</div>
<!---important script tabs--->
                <script>
(function() {
var tabView = new YAHOO.widget.TabView('demo');
YAHOO.log("The example has finished loading; as you interact with it, you'll see log messages appearing here.", "info", "example");

})();
</script>
</td>
</tr>
</table>

</body>
</html>

That's it. You are ready to go. Don't forget to include the script tabs at the bottom it will not run without this! You can view my example here.

Posted At : March 28, 2008 1:29 PM | Posted By : Nicole Henningsen

Photoshop Hue/Saturation modifying image colors



I have had a few friends ask me how to change the shirt color or a persons eyes in pictures using Photoshop. This is something I do all the time! If I find a image on stock.xchng (free stock photo site) and I don't like the shirt color someone is wearing I simply modify it in Photoshop to my liking.

Today I am going to use an example of a Tree frog to adjust its hue and saturation. The reason I wanted to use a tree frog is because it has very bright vibrant colors but you can use this tutorial on any image!

The first thing we are going to do is create a new Photoshop file by going to File-->new and select your size and background color. For my image I am using a white background 510 wide by 373 high. Now that we have a blank Photoshop file lets create a new layer. Open up your layers panel (F7 or go to Window-->Layers) and create a new layer. I called my layer Tree Frog. Now paste in your image that you wish to change.


Click Image to Enlarge

[More]

Posted At : January 15, 2008 8:38 AM | Posted By : Nicole Henningsen

Wireless charging pad device freeing up outlets everywhere


While working out the other day I caught the end of the greatest gadgets of 2007. One of the items on there was a charging pad called WildCharger. The WildCharger is a small thin pad that lies flat that allows up to five devices to be set on it to charge. Being a techie this grabbed my attention! Most people these days (at least in my house with both my husband and I being Techies!) have several things that need to be charged. I am constantly finding myself with a dead cell phone battery or an iPod that needs to be charged etc.

[More]

Posted At : January 14, 2008 8:52 AM | Posted By : Nicole Henningsen

Free online day planner using Mapanno

planner
I was cruising Adobe labs this morning just checking out the new things that have been added. While looking I came across something called Mapanno. Mapanno uses DHTML to create visual tags that overlay an image. Mapanno uses images from flicker or 23. As I was looking through a few of the examples I came across the online day planner. I am a pretty organized person so my first thought was hmmm I wonder how easy this is to actually use. I registered and in about five minutes I had a day planner created with a few markers. Mapanno is free and very easy to use. Check out Mapanno's web site there are several different examples on how to use Mapanno. You can view my day planner example here

Posted At : December 6, 2007 8:30 AM | Posted By : Nicole Henningsen

Adobe Products

Good News everyone CF Webtools is now providing links to purchase Adobe Products. You can purchase products such as Coldfusion 8, Coldfusion 7, and all the latest CS3 products. You can view these products on the right panel of my blog labeled Adobe Products or visit the following URL
http://www.cfwebtools.com/index.cfm?objectid=9267BAF7-A398-6469-555306113B3F17C8




Blog provided and hosted by CF Webtools. Blog Sofware by Ray Camden.