CSS Menu Generator - HELPfor more info on how to use CSS Menu Generator -- read below...
Adding the CSS menu to your page |
To add the menu to your page you must do the following:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<!-- Keep the http-equiv meta tag for IE8 -->
<meta http-equiv="X-UA-Compatible" content="IE=8" />
<!-- Link the CSS file here -->
<link rel="stylesheet" type="text/css" media="screen,projection" href="/style.css" />
</head>
<body>
3. Now, go and get the menu itself. You can get it from the "index.html" file in the generated "template" or, if you prefer to use directly the code from CSS Menu Generator, go to the "XHTML Code" tab, select the menu code and click "Ctrl+C":
Now go and paste this code on the target page (must be where you want the menu to be placed but in the body section of your document)
4. Now go and save the csshover file in the same folder where the css and html files are located. Remember, in this example we put all files in one place (the folder where our target html page resides)
5. Upload the modified html page, the css file and the hover file to your server.
Note that you may want to place the css file and the csshover file in different place than the folder where your target html page is located (for example, if many pages in different folders must share the same css). In such case you must modify the "link" line (in the head part of the document, where we add the css file to the page) and one line in the css file itself (to point the css code to the real place where csshover2 file is located). For example, if we placed the style.css and csshover2.htc files inside the /menucode/ folder of our site, we will change the files as follows:
(a) the css linking into the html file must point to the right path:
<head>
...
<!-- Keep the http-equiv meta tag for IE8 -->
<meta http-equiv="X-UA-Compatible" content="IE=8" />
<!-- Link the CSS file here -->
<link rel="stylesheet" type="text/css" media="screen,projection" href="/menucode/style.css" />
...
</head>
(b) You must also change line 9 of the css file (style.css in our example) to reflect the csshover2.htc file position:
...
body {
background-color: #ffffff;/* for pull-down menu to work in IE6*/
behavior:url("/menucode/csshover2.htc");}
...
And again: do not forget to upload the files to the real server ;-)
[ back to top ]