Spread the word

Showing posts with label Web Designing. Show all posts
Showing posts with label Web Designing. Show all posts

Thursday, October 13, 2011

How to Color Alternate Rows in a Table with JavaScript and CSS

Tables should be used only when you are actually representing tabular data. Yes, we know that. But by default tables are not so much usable unless we put some addons and make tables usable. One of the best ways to make tabular data usable is to color alternate row backgrounds with different colors so that users don’t get lost while looking into long set of data. This not only helps users to remain on a specific track but also helps them interpret data precisely without generating much visual noise.

You can checkout the Demo of Alternate Table Row Coloring here.


Here is a very simple JavaScript script which can transform any existing tables on a page into tables with alternate row color backgrounds. This scripts check for specific class for a table on a page and puts different classes for different <tr>.
You can simply copy the following code and paste into the <head> section of your page.

Sunday, July 17, 2011

How to Create a Link To Smoothly Scroll To The Top of a Page by jQuery

"Go to top" is a very popular link that we use to put into web pages when pages tend to be long and users always need to go back to the top of the page to avail the options. Users can obviously go back by scrolling up and up and up. But we can also provide them with an option at the bottom of a page, clicking which will automatically take the user to the top of that page.

The most natural and effective way to do it is to place a "quick link" or "inpage link" which should be linked to the ID of the topmost element on the page.

Example of go to top link on a webpage:

Tuesday, March 22, 2011

How to Create Easy Collapsible and Expandable Lists in JavaScript

Here is a very quick and easy way to make your lists collapsible and expandable on clicks by using JavaScript. Now when presenting a long lists of item you can set them to remain collapsed on page load, but after that users can click and expand any of those list headings to see the full list of items. Unlike accordion, here users can easily open up all the lists one by one. Checkout the Demo of Collapsible and Expandable Lists which is created here.
First, just include a JavaScript file in your <header> section of the page -

<script src="http://www.acmeous.com/tutorials/demo/acmeousCollapsibleLists/acmeousCollapsibleLists.js" type="text/javascript"></script>
Then just below it, within the <header> section of your page, add the following code -

Friday, March 18, 2011

Differences Between Strict and Transitional DOCTYPEs

Attributes which are deprecated in Strict DOCTYPEs:

  • align (allowed on elements related to tables only, like - col, colgroup, tbody, td, tfoot, th, thead, and tr)

  • target

  • language

  • background

  • link

  • hspace

  • noshade

  • nowrap

  • bgcolor

  • text

  • vspace

  • vlink

  • alink

  • height (allowed on img and object)

  • border (allowed on table)

  • width (allowed on img, object, table, col, and colgroup)

  • name (allowed in HTML 4.01 Strict, not allowed on form and img in XHTML 1.0 Strict)

Wednesday, March 16, 2011

Gmail Changes Refresh Link to Button - A Notable Use Case for Information Architects

Now this time it is a relatively small change in Gmail that caught my eyes, but definitely it was not that small to remain un-noticed. Yes, the Refresh feature of Gmail. Frankly speaking I used this feature very less cause I was in a habit of clicking the Inbox link rather, and it was from the time when Refresh feature was not even available to Gmail.

Wednesday, December 22, 2010

Difference Between XHTML and HTML4

HTML is the Hyper Text Markup Language which is rendered by any web browser you use to visit any website or web application. Whatever programming language, whatever platform a website or web application uses, it drills down to HTML only for your browser. So HTML is the building block of the World Wide Web which has not seen much significant improvement during last 2 decades except the Extensible Hyper Text Markup Language - the XHTML.

Here are the very basic differences between HTML and XHTML -

1) All documents must be well formed and properly nested

<p>The food is <em>delicious</em></p> - Correct.
<p>The food is <em>delicious</p></em> - Wrong.

2) Elements and Attributes must be in lowercase

Wednesday, January 28, 2009

How to find unused CSS classes and selectors within a website

Many times we think of using some class or id within a CSS but later on decide not to use them finally. But several times we forget to delete those classes from the CSS file. This may not be a problem for sites where the use of CSS is very less. But this may be accountable for much junk lines within your CSS which are unnecessary and unwanted.

Saturday, January 10, 2009

How to Validate Browser Specific CSS Hacks

Almost everyone who is a XHTML/CSS Developer knows Browser Specific CSS Hacks. If you don't know then you can know what Browser Specific CSS Hacks are from here. While creating tableless websites on CSS the biggest issue we face is consistency of the pages over various browsers i.e. cross-browser compatibility. So to make the websites and pages cross-browser compatibile many times we use several Browser Specific CSS Codes or Hacks. Though it is advices to avoid those Hacks since they are not by the standards, many times we are unable to do that.

Google Changes their Favicon Again

Yes, Google now changed their Favicon again. Last year at the end of May they changed their initial minimalist Favicon with that simple G in caps within a border of different colors of the Google logo. Then they came up with a more minimal design of the favicon with small g in blue and nothing else, which they said to be compatible for iPhones.

Tuesday, December 16, 2008

What is Validation and why validation is important?

Validation is a process of checking webpages against Web Standards, mainly those which are published by the World Wide Web Consortium (W3C). Validation is done for HTML, XHTML, SMIL, MathML, CSS, RSS/ATOM Feeds, XML-derived Web document types, WapForum for WML, etc. Every language has its own grammar and syntax and so every document designed with these computer languages are expected to follow these guidelines and rules so that they are standard complaint. The markup languages of all versions use a specific declaration called Document Type Declaration (DTD) which is machine-readable grammar, inherited from SGML. When a webpage passes through this validation process then the page is called valid.

Thursday, December 11, 2008

How to decrease the size of Flex Applications

While working on Flex you may have noticed that the application you design on Flex many times takes up a bit more disk space than it is intended. There are still some methods through which you can significantly decrease the size of those Flex applications up to 60-70 percent. Here is the detailed video of those processes to decrease the file size of your Flex files. Here you can see how a very simple Flex application of 375461 bytes is reduced to 50661 bytes.

Thursday, October 30, 2008

How to add link and script codes in the Head tag from the body section through JavaScript

Many times we need to add <script> or <link> tags for some selected pages of a website. In many websites we use Content Management Systems or some templates where we can’t add different headers to different pages. But in many pages we need some extra functionality through scripts and other codes which are used differently in different pages within that site. Sometimes we need to insert the scripts within the page body tag which is not at all Web Standards compliant. The scripts and links to css or JavaScript files should always be in the head tag.

Monday, September 8, 2008

How to Design stylish variable width Web 2.0 Tabs Menu for your Web Applications

We use to see several types of navigation around different websites. Tabs are also one of the attractive navigation styles prevailing today. Thought they are stylish and useful to users, they never take up much of your real estate. But whenever you are creating tabs, you should not create fixed-width tabs. Then you will need to assign the maximum width to all items. That is space consuming and many times becomes ugly.
Stylish TabsHence you should design tabs which will take space as per the menu items. Here is how you can do it easily. You can create tabs just as in this image in few minutes. First you have to get the design as you want for your tabs. Now you need to slice them out to get these following pieces which will form your tab.
Here are two sets of tabs, one for inactive tabs and another for active tabs. You can have the third one to set on mouseover condition.

Sunday, August 3, 2008

Delicious changes look and feel and improves its Usability

Delicious has re-designed their service website with many cool looks and huge Usability features. It seems that Delicious has decided to take a hands on to their competitors as well.
Delicious has a bold new design that is more powerful and easier to use, along with a revamped search that's faster and more robust. It's also full of useful features that people have been requesting for years
- says Delicious.

Wednesday, July 9, 2008

How to display html codes in your blog posts

Many times you need to show up HTML or JavaScript or PHP codes in your posts, but you don't want them to execute. You just trying to show your users how to write the code. Then you need a tip so that the codes don't get executed, but show up as it is as texts. You can do it easily through pre tags. Anything you insert within a pre tag, it is displayed as it is as texts and not executed. Here is an example of using pre tags to show html codes.

Saturday, July 5, 2008

Benefits of CSS based sites over Table based sites

There are lots of benefits in creating CSS based sites than table based sites. Always you may have heard the terms like tableless designs, CSS based sites etc. But if you have always thought that why you should leave your table based designs and take upon tableless designs, then here are the explanations to your thoughts. The key benefits to CSS based sites on tabled sites are:

Monday, June 30, 2008

How to create stylish text inputs for search, login or comment forms

You may have seen many stylish text inputs and designer forms in many websites. Just putting some text inputs and text areas and buttons, can't attract users to click there or type in some texts for you. If you wish your users grab those forms and fill out important information for you, you have to make those inputs in such a way that users get them accustomed with your site's theme. Users generally find no input forms to be interesting except it is a search box, which he/she have to use without any other option. But still f you make search inputs similar to your theme, it adds to your design and make it comfortable for your uses. After all designing is all about making elements soothing to users' eyes.



Here is a tutorial to make text inputs beautiful and matching to your website's theme. Suppose you have a login input in a bar, where users enter their passwords. Here is a sample how the input has been matched with the bar.




Here I have created a stylish input matching with the dark red colored background bar. Now lets see how you can implement it.



At first just insert normal form and input elements in your page like this.



Login:



View the source to get see the code.
This has inserted a form and a text input in your page. Notice that I have put an id="passText" in the input element. This will help you to stylize it through CSS. Now here is the CSS part.

#loginForm [
background: url(images/passText.jpg) no-repeat;
/* where passText.jpg is the stylish box image */
height: 20px;
width: 100px;
font-weight: normal;
color: #ffffff;
border: 0px;
}

#passText {
width: 80px;
height: 18px;
margin-left: 18px;
background: transparent;
color: #ffffff;
}


Now this will transform your input box just as you wished and seen in the picture. The form has the image for the text input in its background, and the input text's background is transparent. The size of the input text is made smaller than the form, so that the texts typed inside the input don't come out of the designed box.


This is the basis of form designing and in this pattern you can make your forms look beautiful and totally matching your site's theme, which adds beauty to your site. Now make designer forms and inputs and attract users to use them more and more.


Friday, June 27, 2008

Most Exciting Feature of Firefox

Firefox has been launched and claim to have more than 15,000 changes which are going to improve performance and stability of the browser. This version of Firefox i.e. Firefox 3 is based on the Gecko Web Rendering platform, version 1.9. Mozilla claims this version of Firefox to be much stable and with high performance value for its users. Mozilla claims this version of Firefox to be much stable and with high performance value for its users. Firefox 3 has also been improved in terms of security and sustainability, to provide its users more secure, easy and stable platform for web browsing.

MySpace Changes its Designing Look and Feel

I always had issues with MySpace looks. Though its obviously very easy and in your face type designing that MySpace had been till now, but its new looks have a cool effect which adds to MySpace reputation. I must say, MySpace is now looking real Web 2.0. The home page slide show is also very attracting and inviting to new users. The navigation at the top, after the header give a very well planned and concise look, which groups some alike menus.

Friday, May 16, 2008

CSS Trick - Removing on-click Dotted lines around links

Whenever you visit any website in Firefox, you many times may have noticed that a dotted outline appears around links whenever you click on them. This dotted outlines doesn’t comes in Internet Explorer. This thing happens only with Firefox. You may have thought that this thing doesn’t looks cool on your website. So here is a very easy solution to stop this behavior in Firefox.



You have to configure your a tag and a:visited tag to stop this. Just add this lines of codes in your css file and get reed of this unwanted behavior.



a {
outline: none;
}
a: visited {
outline: none;
}

This is all that does the trick and makes your website more cool.