Archive

Posts Tagged ‘css’

Why a web page needs to be XHTML & CSS validated?

Tuesday, April 24th, 2007

While developing a web page, we normally go for XHTML (preferably, Strict 1.0) & CSS2 validation. This is due to the following reasons:

  • All browsers are competing to comply to the W3 standards. Suppose, for example, an updated version of a browser is released. Our web page may not look as expected if the page does not comply to w3 standards. If we have validated it then it will look fine in the new versions of browsers without making any further changes to the source code.
  • There are lot of browsers in web world. While developing a web page we don’t get chance or time to test our pages in all browsers. But if we have made our page XHTML & CSS validated then we can well be assured that the web page will retain most of its original look & feel in all browsers.
  • Search bots find complied (or validated) pages easy to index.

We can check our web page against XHTML validation at:

  1. XHTML: http://validator.w3.org/
  2. CSS: http://jigsaw.w3.org/css-validator/

Underline on mouse rollover

Wednesday, March 14th, 2007

Underline on mouse rollover

There are two ways of achieving this functionality

1. Javascript
2. CSS

Javascript:
By using “onmouseover” and “onmouseout” events which calls two user defined functions “blockStyle(‘param’)” and “displayStyle(‘param’)”,where param is a unique id for that hyperlink when the event occurs.
Eg. click here

CSS:
By using hover.
Write this source code in the css file.
a:hover
{
text-decoration:underline;
color: blue;
}
This above code will affect all the hyperlinks(anchor tag) in the same webpage.

Recent Comments

  • Stanford Reach: Great post. Thanks!
  • Shu Crunk: I was simply browsing for useful blog articles intended for a project research and I happened to stumble...
  • Marya: Hey rather wonderful weblog!! I’ll bookmark your weblog and grab the feeds conjointly…
  • John Vay: ive just started my own hosting company its such hard work haha :P
  • write a good resume: Your the best!