Archive

Archive for the ‘CSS’ Category

Using none web standard fonts with Google Font API

May 20th, 2010 No comments

Google has launched Google Font API and Google Font Directory Beta.

A developer will be able to link and use a range of fonts legally without the need of them being installed on your machine or web directory, through a single line of code.

The Google Font Directory currently has 18 licensed fonts available like the font I'm using in this article and will offer more as time goes by.

Below is an example of how to use Google Directory.

For example if you want to use the font used in this article Droid Sans you would copy the code below and put it as the first element in the <head> of your document.

  1. <link
  2. href='http://fonts.googleapis.com/css?family=Droid+Sans'
  3. rel='stylesheet'
  4. type='text/css'>

The API will generate the necessary CSS specific to the user's browser so you can use the font on your page. Simply use the font Droid Sans in your CSS font stack like any other font, for example:

  1. h1 { font-family: 'Droid Sans', arial, serif; }

And that's it. To easy!

Remove dotted lines from links

February 18th, 2009 3 comments

The dotted lines that appear around links is an accessibility feature for people who can't use a mouse and are forced to use a keyboard to navigate. It works well when you use the tab key but it still shows when you are using a mouse.

If your working on government sites that need w3c compliance then I would not recommend removing this feature, otherwise use the CSS code below.

  1. a {
  2. /* Mozilla */
  3. outline:none;
  4.  
  5. /* IE */
  6. -moz-outline-style: none;
  7. }

You could get fancy and use the dotted line to your advantage. With CSS you can change the dotted line type to solid or change its colour to suit the design.

Good Luck!

Categories: CSS Tags: ,

IE6 link problem – links are not clickable in some areas of the page

January 13th, 2009 2 comments

IE6 does not recognize links when placed over an absolute positioned background .png image.The solution is simple. Simply add "position: relative" to you links.

Categories: CSS Tags: , ,

How to remove yellow background from Google Autofill in your web form

January 13th, 2009 No comments

The best way is using CSS (Cascading Style Sheets) by adding background colour for your form field with !important.

For example:

  1. input {background-color: #FFF !important;}
Categories: CSS Tags: ,
SEO Powered by Platinum SEO from Techblissonline