dress up your interface >> daily fresh clickable icons / at a click

Put some style in your input type=”text” with CSS

by domagoj 2. December 2007

Just want to give you some inspiration...

 

View Sample or Download in 1 ZIP file

 

You can also see how to create icon in this input box on our blog - How to Create an effective Search VISTA Icon

About code

CSS attribute for radius (“-moz-border-radius-…”) works only in Firefox, all other elements should be cross-browser compatible. It’s very easy to do.

All we need is 1 html tag:

  <input type="text"/>

and css:

input

{           background: url(search.png) #ffffff no-repeat left center;

            border: 3px solid #EEEEEE;

            color: #808080;

            font-weight: bold;

            font-family: "Lucida Grande" ,Verdana,sans-serif;

            height: 24px;

            padding-left: 30px;

            padding-top:6px;

            width: 300px;

            font-size: 1em;

            vertical-align: middle;

            text-decoration: none;

            -moz-border-radius-bottomleft: 4px;

            -moz-border-radius-bottomright: 4px;

            -moz-border-radius-topleft: 4px;

            -moz-border-radius-topright: 4px;

}

input:hover

{

            border: #d3d3d3 3px solid;

}

 

Office 2007 style tooltip in JavaScript

by domagoj 11. August 2007
I've made a very simple implementation of tooltip in JavaScript, it looks very similar to original found in Office 2007. Feel free to use, tweak or improve this script.

 

Below are screenshots and here is the demo page

Simple tooltip

Elements: title, text

Office 2007

Our tooltip

  Function call for this tooltip:

onmouseover="showTooltip('Simple tooltip,'This is simple tooltip')"

 

Simple tooltip with additional help info

Elements = title, text, additional help icon, additional help text

Office 2007

Our tooltip

Function call for this tooltip:

onmouseover="showTooltip('Simple tooltip with additioanl info','This is simple tooltip with additional info','Press F1 for more help','helpicon.png')"

 

Complex tooltip

Elements: title, text, additional help icon, additional help text, picture

Office 2007

Our tooltip

Function call for this tooltip:

onmouseover="showTooltip('Simple tooltip with additioanl info','This is simple tooltip with additional info','Press F1 for more help','helpicon.png','graf.png')"

 

 

The script is not finished, I've put it only for demonstration, but if you find useful, feel free to grab source code.

The only thing I couldn’t copy was the gradient background, so I used something in between as background and put in variable tooltipBackColor (as you can see on screenshots I use black color scheme in Office 2007) .

How to use?

Just call function showTooltip() in onmouseover event and onmouseout call hideTooltip.

Sample:

<a href=”#” onmouseover="showTooltip('Caption’,'Tooltiptext')" onmouseout="hideTooltip()" />

What parameters can I use?

showTooltip (‘Caption’,’Tooltip text’,’Additional help text’,’Additional help image path’, ‘Main image path’)

Compatibility

Tested on: IE 6 & 7, Firefox 2, Opera 9.2, Safari 3 for Windows

Summary

This script is not finished yet, all comments, bug reports and suggestion are welcomed.

Download in 1 zip file

Demo page

 

 

How to create VISTA style toolbar with CSS

by domagoj 4. August 2007

UPDATE: 14.09.2007.

The unfortunate forgery of this article has been removed from the the Internets. Yay! The victory is ours! 

UPDATE 13.09.2007.

Due to great demand, now you can download all files in 1 zip file

VISTA_toolbar.zip (20.36 kb)

I want to show you what you can do with a minimal effort and a little imagination. Here's a screenshoot from Windows VISTA. We'll try to reproduce that toolbar, with buttons and hover effect in cross-browser compatible CSS and HTML.

Screenshoot from Windows VISTA
vista toolbar

 

Our toolbar with few line of css and html. Click to see live demo
vista toolbar

All toolbar icons are from itookia.com

 

Toolbar

We'll define toolbar as user list tag -> <ul>. <ul> tag will be in #vista_toolbar <div> tag. Each <li> element will be toolbar button. So when you need a new button you just add new <li> tag, hmmm I just love CSS! Here's how it looks in HTML

<div id="vista_toolbar">

<ul>

            <li>...</li>

      </ul>

</div>

Ok, lets define CSS for this elements

First <div id="vista_toolbar">

 

#vista_toolbar {

float:left;

font:normal 12px 'Trebuchet MS','Arial';

margin:0;

padding:0;

}

 

It's straightforward.

 

<ul> element CSS

 

#vista_toolbar ul {

background-image:url(back.gif);

background-repeat:repeat-x;

float:left;

line-height:32px;

list-style:none;

margin:0;

padding:0 10px 0 10px;

width:500px;

}

 

Height of toobar define with „line-height:32px;“ and width with „width:500px;“. And 10 px padding because we don't want to start with buttons from beggining of toolbar.

 

<li> element CSS

 

#vista_toolbar li {

display:inline;

padding:0;

}

Display „inline“ because we want our buttons to be displayed in row.

 

 

Buttons.

How to create a button? It's simple, we will use Sliding doors technique.

Just crop picture of button.

left vista button  left.png

vista button right  right.png

 

we'll add this picture on a:hover in CSS and it works in IE6 as well. Let's go!

 

HTML code of button

 

<li>

<a href="#">

<span>Add New</span>

</a>

</li>

 

If you want add picture next to text just add <img align="left" src="files/add.gif" alt="add new" /> in <span> tab

Example HTML code for button with image:

<li>

<a href="#">

<span>

<img align="left" src="files/add.gif" alt="add new"/>Add New

</span>

</a>

</li>


 

Put it in work with CSS

#vista_toolbar a {

color:#FFF

float:left;

padding:0 3px 0 3px;

text-decoration:none;

}

 
Color property is defined because we need to override default link color with white color and also text-decoration.

 

#vista_toolbar a span {

display:block;

float:none;

padding:0 10px 0 7px;

}

 

#vista_toolbar a span img {

border:none;

margin:8px 4px 0 0;

}

If we have image next to text we must center her vertical with margins.

Here is a CSS code used to make hover effect

 

#vista_toolbar a:hover{

background: url(left.png) no-repeat left center;

}

 

#vista_toolbar a:hover span {

background:url(right.png) no-repeat right center;

}

 

Cross-browser compatibility?

Tested in: Firefox 2, IE 6, IE 7, Opera 9.2, Safari 3.0.3 for Windows

If you test in other browsers please let me know.


Summary

I hope this tutorial was helpful. Feel free to post any comment. 

Have a great week! 

Powered by BlogEngine.NET 1.2.0.0
Theme by Itookia.com

Calendar

<<  August 2008  >>
MoTuWeThFrSaSu
28293031123
45678910
11121314151617
18192021222324
25262728293031
1234567

View posts in large calendar

Categories


Archive

Skype us

Djurdjica

My status



Domagoj

My status



Our friends


Axialis Software - Icon, Cursor and Screensaver Authoring Tools for Windows