
Description:
Removing exta space in input button.. Toggle select and unselect checkbox with text.. Jquery client side validation.. Png background fix for ie6 using css..
Contents:
Removing exta space in input button
When to try to expand the value text in the input button, in ie7 or lower version, it will take spaces automatically to the left and right of the text. How can you overcome this?
Here is a simple solution for that.
Just add overflow:visible to it.
This will do the magic....
Toggle select and unselect checkbox with text
Here is a simple javascript to toggle between selected and unselected of a checkbox. And also it will toggle the text, for example when you click on the select link the text will change to unselect and the vise-verse...
function ToggleCheckBox() { var ischecked=document.getElementsByTagName("input"); var divid=document.getElementById('id name'); for(i=0;i<ischecked.length;i++) { if(ischecked[i].type == "checkbox") { if(ischecked[i].checked == true) { divid.innerHTML="Select All"; ischecked[i].checked=false; } else { divid.innerHTML="Deselect All"; ischecked[i].checked=true; } } }
}
Jquery client side validation
When i was browsing the net for using the client side validation using jquery to my site, i found a useful plugin which will validate the form. I have gone through the reviews of this plugin and most of them said that they are using this plugin and it is really nice.
I thought that i would share this to all, so that it would be useful. Bassistance.de is the site which gives the plugin.
Follow the link will help you how and where to use Client side validation
If anybody have used it before, please share your experience.
Png background fix for ie6 using css
Previous we have seen about how to give hack for png image for ie6. In this post we will be knowing how to fix a png background using css for ie6.
HTML <div class="img_txt">dhsfds</div>
CSS .img_txt{background:url(mobile.png) repeat;_background-image:none;_background-repeat:repeat-x;float:left;width:300px;height:130px;_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='mobile.png', sizingMethod='crop'}
Hope this will fix for the background png.
Simple animated drop down menu using jquery
This tut will help you to have a simple animated drop down using jquery. Before using this please add the js file from jquery website. Refer the site http://jquery.com/ for more details. You can download the minified version or the developer version.
Once you download and include in the page then using the below steps. HTML
<ul class="drospdown"> <li><a href="#">A Website #1</a></li> <li><a href="#">A Website #2</a> <ul> <li><a href="#">Indoor</a></li> <li><a href="#">Outdoor</a></li> </ul>
</li> <li><a href="#">A Link #1</a></li> <li><a href="#">A Link #2</a></li> <li><a href="#">A Website #3</a></li> <li><a href="#">A Website #4</a></li>
<li><a href="#">A Link #3</a></li> <li><a href="#">A Link #4</a></li> </ul>
Javascript
function mainmenu(){ $(" .drospdown ul ").css({display: "none"}); // Opera Fix $(" .drospdown li").hover(function(){ $(this).find('ul:first').css({visibility: "visible",display: "none"}).slideDown(400); },function(){ $(this).find('ul:first').slideUp(400); }); } $(document).ready(function(){ mainmenu(); });
this will give you an animated drop down menu...
Making usability a practice
As we all use form in the design to fill user information or such. Similarly we also use radio option to select and will give label to it. But the common usability mistake is when we click on the label, the radio option will not be selected. We need to do that. So here is a simply way
Using the for attribute allows the user to click the label to select the appropriate input fields within a form. This is especially important for checkboxes and radio fields to give a larger clickable area, but its good practice all round.
Website to capture screenshot
Most of our website have contact forms where visitors can fill in their email address and send a message directly to the site owners with some limitations. But some issues might be clear or some might not.
The visitor cannot attach image files with the message.
Here is a easy solution. To solve this very problem and make things a bit more convenient for your visitors, SnapABug has released a simple JavaScript based Help widget that can be added to any website with a simple copy and paste.
The Snapabug widget will add a "help" button to your website and when visitors click this help button, they can not only send a message to your email address but they can also chose to include a screen capture of the web page with the message.
SnapABug will automatically attach a screenshot with the browsers user-agent string and OS details of the visitor. And the Help widget is absolutely free
So what for you waiting for, have a TRY!
Adobe Web 2.0 Productivity Workshop
Great News for web developer and web designers, here is an opportunity to have a full session of knowing the web2.0 cutting edge latest technology of Adobe Productivity Workshop.
Adobe is conducting a one day program in Chennai. So if you are interested, here is an opportunity to know the latest adobe Productivity Workshop.
Venue: Hotel Park Sheraton
Date: 16th Sep 09
Time: 9am - 5pm
Detailed Agenda 09:45am - 10:15am Registration
10:15am - 11:00am Professional website design with Adobe Dreamweaver CS4
11:00am - 11:15am Tea Break
11:15am - 12:45pm Rich interactive content development with Adobe Flash CS4 Professional
12:45pm - 01:15pm Web prototyping and image editing with Adobe Fireworks CS4
01:15pm - 02:00pm Lunch Break
02:00pm - 02:30pm Audio creation and editing with Adobe Sound booth CS4
02:30pm - 03:15pm New dimensions in digital imaging with Adobe Photoshop CS4 Extended
03:15pm - 03:45pm Inspired vector graphics creation with Adobe Illustrator CS4
03:45pm - 04:00pm Tea Break
04:00pm - 04:30pm Flexible web publishing with Adobe Contribute CS4
04:30pm - 05:00pm Sneak peek of Adobe Flash catalyst
Hurry! only limited seats. Here is the link to Register.
For more details Call: 09311 469593 Email: abode@channel-technologies.com
So see you there!
Test your Website in different Screen Resolutions in one place
Experts says that when you are publishing a website for viewers, you should optimize the web pages for 1024768 resolution as it is still the most common size. So you must always keep in mind when you are designing a website, make sure that the layout should be good and readable in all the resolutions.
Have you ever wondered how your website appears to a visitor who might be using a different screen resolution?
Tried of changing your resolution each and every time when you are making changes?
Here is a simple way to check your web page in all the resolution in one place. Viewlike.us is the site you are looking far.
Just type the address of your web page and the tool will show you how that page will look like in different screen resolutions. You can test the layout using most common resolutions like 800600, 1024768 or even the iPhone and Wii browser.
Create gradient buttons using css
Creating a glossy gradient button effect is easy to make in photoshop. But for example, in your site you want ten buttons to be created. So what you will do, as of all we will be creating 10 different button in photoshop.
But all of these button will make your page weight of having 10 request to the site. So here is a simple trick how to create different buttons with single transparent image.
Follow this simple steps... Download the png file to have the gradient button. And copy the HTML and CSS code. So you will not be creating different image, just this png image will do the magic.
HTML: <a href="#" class="btn ovrlay ">Super Awesome Button</a>
CSS: .btn{font:13px arial;color:#fff;text-decoration:none;} .btn:hover{background:#630030;} .ovrlay{background:#A9014B url(btn-overlay.png) repeat-x;padding:5px 10px 6px;position:relative;} .btn{background-color:#E33100;border:1px solid #7c1f06}
Just change the color of the .btn class, similarly you can have different n number of buttons by just class....
Before Gradient effect

After Gradient Effect

PNG Transparent Image
 Just copy the above png image...
Note: Do not forget to put png hack for ie6.
Convert images to vector formate
Designers used to take images from a famous image selling website for their site to be used. But at some point they also need vector based images to be used such as for logos, header images etc to give a clarity picture.
These vector images can be resized to any size so that the quality of the image will not get damaged. But converting an image to vector formate might be costlier. So what to do? where to go?
Here is a simple solution to convert your image to vector images. Vector Magic.com is a free online image to vector Convert site. Easily convert bitmap images to clean vector art.
Convert bitmap images like JPEGs, GIFs and PNGs to the crisp, clean, scalable vector art of EPS, SVG, and PDF with the world's best auto-tracing software.
Upload the image to be traced and within seconds you will get the image converted to vector format. You can also edit the configuration such as details, colors etc. But the only worry is they leave a water mark of their website at the bottom of the image. I think the designer know what to do with it!
They also provide a desktop version for trail, where you can download and install it in your pc. Then you can work on it. The desktop version also contains the background remover which is not available in online version.
If you want to convert many images to vector, you can go for the trail version and if you are interested you can buy the software. Because i think it gives a better quality and clarity vector images.
And also they provide hand tracing, where you can order for images to be converted and they will do it for you.
Center align a div horizontally and bottom of the page
There is an easy way to have the div position to the left or right to the screen with the use of fixed property. But how do you make a div horizontally center aligned and always be at the bottom of the page?
This will be of great useful if you want to make any popup div for display important messages or take any surveys etc. So here is a simple trick to show the content of a div horizontally aligned and always be at the bottom of the page...
HTML: <div class="parent"> <div class="child"> Content here </div> </div>
CSS: .parent{ position:fixed; bottom:0px; width:100%; //width should be 100% } .child{ width:300px; //min width should give to center the div. margin:0px auto; //here it will make center }
Position fixed will support modern browser including ie7, but for ie6 you have to use microsoft expressions to render the page as position fixed, as it will render wrongly. If you find any solutions without using expression in ie6, please explain use which will be helpful to others.
Yahoos Text-Sprite Generator
Some of them called it as Yahoo's secret text sprite generator, because i think yahoo has not publish it officially. This is a pretty cool stuff by yahoo, which will generate a sprite to the text given.
Basically its a URL you can hit which will create a perfect sprite-ready PNG graphic of the text you include in the URL. Check it out for yourself:
Here is the url... http://l.yimg.com/img.sports.yahoo.com/static/bir/headline?txt=webdevelopertut
Just copy the link and paste it in the address bar. You can have your own text just like i have used webdevelopertut. The image generated is always 46868px and the color is white on top and yellow-orange on the bottom. Where you can use it for hover also.

For SEO, you can use CSS font replacement technique to have both text and image versions.
Float bug fix in div to expand
Many of would find a problem when using a block(div) called a container with the background color, where you don't want to use float or height to the div. And in the inner div of the container you want to give float to it.
You can find this issue in most of the browser like ie, firefox, the container will not expland as the inner div.
For Example: HTML: <div class="container"> <div class="inner_div"> blablabla <br> blablabla <br> blablabla<br> </div> </div>
CSS: .container{width:300px;background:red;} .inner_div{float:left;width:200px;font:12px arial;}
The red background in the container div will not expand when you add content to the inner div. So here is a simple trick to get the container div to expand.
Just add .container{overflow:hidden;}
Will make the job easy.
Principles for keeping your code clean
The art of writing HTML and CSS is the foundation of a beautiful website. The advantages of clean, semantic HTML are many, but so many websites suffer from poorly written markup.
Most of the attractive website have beautiful designs but fails to pass in the w3c validations. This is because of bad coding. These are the basic and most follow principles for keeping your code clean and have a semantic structure. They are as follows...
1. Strict DOCTYPE 2. Proper indentation 3. Nest your tags properly 4. Character set & encoding characters 5. Eliminate unnecessary divs 6. Use better naming conventions 7. Leave typography to the CSS 8. Use Class/id the body tag 9. Keep your CSS and JavaScript external 10. Validation
This will be a great start to write clean HTML, but there is still lots more. When starting from scratch, this seems to be much easier. When trying to fix existing code, it feels a lot more difficult. SO from the next project, just think what you can make it right.
Colour Picker for web designers
Designers used to develop the website with the combination of colors using photo shop to make the website more attractive. Now a days developers used to select the color with the help of addon called color picker using firefox.
Imagine when you move to a place where you see some beautiful colors, pictures, spots etc.. where you want to take a combination of those colors, when you don't have a laptop or camera with you. What you will do?
 Designer Jinsun Park from Korea has come out with a simple tool called 'Color Picker', which is just look like a pen. This color picker pen consists of
1. RGB Color sensor. 2. Color scan button. 3. RGB ink cartridge. 4. Color display. 5. Ball type.
Place the pen against an object and press the scan button, the color will be detected by the color sensor and the RGB cartridges in the pen will mixed the required inks to create the target color. And you can also draw the colors in a paper with this pen.
Now it has become very easy with this pen, where ever you go just carry the color picker with you.
Home
|
|