tags:

views:

38

answers:

2

Hi ; We are working on :hover pseudo-class in IE 7, which works only if the docktype is

< !DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/strict.dtd">

,but it decrement the font size of all element

please help me ..

A: 

HTML itself doesn't have any built-in server-side processing. Therefore, it doesn't have the ability to alter itself prior to the response going out.

You have access to javascript, but this is done on the client side, and at that point the browser has already interpreted the doc type.

If you are using a server-side programming language to generate your HTML, then you could include an if statement there, although changing the doctype just so that styling will work correctly is a questionable practice...

Zack
no , i am not using any server side language
Tushar Ahirrao
That really limits what you can do. Basically, without a server-side language, you are stuck with displaying a static HTML page.
Zack
can u tell me the solution
Tushar Ahirrao
There is a solution for your :hover thing, but it doesn't involve the doctype, and I don't know what it is.
Javier Badia
A: 

What do you mean

it change the font of text

Changing a Doctype shouldn't affect anything on the page, except how it validates.

Also what do you mean by

:hover pseudo-class

:hover works just fine in IE6

Jonny Haynes
but not work in IE 7 , and change the font of text means, it decrease all the font size
Tushar Ahirrao
It works in all IEs on anchors. If you're trying to make a div have a `:hover` style use jQuery for IE6(http://docs.jquery.com/Events/hover). As for your font size changing when you change the Doctype, are you setting a default font size on your body? http://www.alistapart.com/articles/howtosizetextincss/
Jonny Haynes
Why do people down-vote but don't leave a comment as to why they've down-voted? That's just bad form.
Jonny Haynes
You were probably down-voted because you gave an "answer" that was just more questions.
Zack