Jump to content

What is the best Doc Type to declair?


confused and dazed

Recommended Posts

Hello Internet.

 

I have been using the following Doc Type for all my pages I am creating and there are things here and there that don’t seem to work on different browsers... things like Hover, mouseover, JavaScript to get a fly-in function working. What is the best Doc Type to use for these kinds of things? I have heard this doc type I have been declaring is a "quirky" doc type.

 

Link to comment
Share on other sites

Theoretically, the DOCTYPE has absolutely no influence on how the page renders. Practically, a standard compliant doctype renders the page right, any other doctype renders the page wrong. I recommend to use the HTML 5 doctype.

 

HTML and CSS do what you tell it to. If your page isn't looking the way you want it to, there's something in your CSS that is making it that way. So in order to solve your problem:

What are you expecting to see and what is actually there? And what code is influencing that?

 

It seems your :hover class is trying to load an image. Until the browser has loaded the image it won't show up on the page. If you hover over the item long enough the image will appear. A way to ensure that images are always loaded is to use a technique called "CSS sprites" (look it up in a search engine)

Link to comment
Share on other sites

I am expecting to see (in safari) a different image. When the page loads you see menu1.jpg and when you hover over it I want to see hmenu1_1.jpg

Basically I have created a "highlight" function of my own. I created an image (menu1) and then in photoshop brightened that image (hmenu1_1).

This works in Explorer but not in Safari or Firefox.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...