CASCADING STYLE SHEETS (Full Version)

All Forums >> [Web Development] >> Cascading Style Sheets



Message


Gill_110 -> CASCADING STYLE SHEETS (5/1/2004 14:23:53)

I would like to create a cascading style sheet for about 40 pages in a web site. I would like this page to have a drop-down navigation menu on it. Can this be done - so that I can link the CSS to the 40 HTM pages so that the navigation menu will appear in all 40 pages? [:)]




c1sissy -> RE: CASCADING STYLE SHEETS (5/1/2004 14:29:54)

Hi Gil_
welcome to the forum,

Yes you can link a style sheet to as many pages as you wish.

The drop down menu question I'll leave to someone more experienced. I think it can be done with css, but not sure. Just be patient, someone will be along to answer this for you.




Giomanach -> RE: CASCADING STYLE SHEETS (5/1/2004 15:40:57)

quote:

I would like this page to have a drop-down navigation menu on it.


Gill

Please define "drop-down menu". Is it like the ones you find at http://www.dynamicdrive.com (see the one near the top of the forums) or one as in when you post a question/reply to set to font-face/size

Dan




jaybee -> RE: CASCADING STYLE SHEETS (5/1/2004 16:24:27)

Otherwise, take a look at www.listamatic.com

Loads of css menu examples in there




Gill_110 -> RE: CASCADING STYLE SHEETS (5/1/2004 16:26:56)

I just want a drop down menu in about 40 pages how can I do this easily without having to alter 40 pages separately.




jaybee -> RE: CASCADING STYLE SHEETS (5/1/2004 16:32:20)

Right, you need to create an external style sheet. save it as a .css file.

You then include this in each of your pages in the head section with

<link rel="stylesheet" type="text/css" href="your css file location"/>

After this, whenever you want to make a change you just do it in the external style sheet.

There is some confusion about what you mean by drop down menu. I have posted a link above to some css menus where you can copy the code. Have a look in there and see if anything suits.




Gill_110 -> RE: CASCADING STYLE SHEETS (5/1/2004 16:41:02)

It's a drop down nagivation menu I want like the one at

http://www.trans4mind.com/personal_development/JavaScript/menu1.htm

I want people to select from the list.




jaybee -> RE: CASCADING STYLE SHEETS (5/1/2004 16:49:39)

OK, we weren't sure if you meant www.serve.com/apg/workshop/cssMenu.html

I would have thought you could use this example to do what you want but just using one main button.

There's another example here http://www.uoguelph.ca/~stuartr/articles/csspulldownmenu.shtml

You will still have to put your menu in each page though. You could use an include to bring it in to each page or a shared border if you're using Frontpage.




gorilla -> RE: CASCADING STYLE SHEETS (5/1/2004 17:05:13)

It is possible to do CSS only dropdown menus but there's a problem. Internet explorer has very poor support for the necessary pseudoclass - hover. It only supports it for links.

One can work around this by using an image map and some quite fantastically convoluted css coding. One can almost hear the browsers including the many that are better than IE creaking under the strain.

For this reason I have never posted the code to do it.

What you will need to do is to use a javascript menu which you create and store on your website separately then call it for each page - typically unsing onload.

Such menus can of course be styled using css. Both www.hotscipts.com and www.dyamicdrive.com have numerous free examples for you to cut paste save and edit.

Don't go down the pure CSS route for this it is emphatically not worth it.




d a v e -> RE: CASCADING STYLE SHEETS (5/1/2004 17:06:55)

i assume from the icon next to the subject title that you are using dreamweaver. this extension should do what you want, and if you look in the help file (when you've installed it and go to insert a menu) then you'll see some notes on styling it with css.
http://members.surfeu.fi/dave_pirjo/test-area/MX154685_p7jumpmenu.mxp




jaybee -> RE: CASCADING STYLE SHEETS (5/1/2004 17:07:22)

Yes I was just looking at the compatibilty issues and it seems pretty dodgy. All the versions I found render badly in one or other browser.

Duh, Dreamweaver, well spotted Dave. I'm getting fuzzy from looking at fuzzy jpegs. I think it's time for a tea break.




gorilla -> RE: CASCADING STYLE SHEETS (5/1/2004 17:15:43)

Dodgy does not even begin to describe it jb. You have to do cascade shunting and its horrible. I really do have to repeat my suggestion that everyone steer clear of it for the moment. Microsoft have said they'll fix it (even for IE6.) I wouldn't hold my breath if I were you. Also of course deliberately triggering one bug in order to exploit another and then as I said shunting the cascade and getting it to validate just wasn't worth it.




jaybee -> RE: CASCADING STYLE SHEETS (5/1/2004 17:37:27)

Soooooooo, it's down to good old javascript then. I know how much you love it Gorilla. [:D]




Page: [1]

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI
0.03125