navigation
a webmaster learning community
     Home    Register     Search      Help      Login    
Sponsors

Shopping Cart Software
Ecommerce software integrated into Frontpage, Dreamweaver and Golive templates. No monthly fees and available in ASP and PHP versions.

Website Templates
We also have a wide selection of Dreamweaver, Expression Web and Frontpage templates as well as webmaster tools and CSS layouts.

Frontpage website templates
Creative Website Templates for FrontPage, Dreamweaver, Flash, SwishMax

Search Forums
 

Advanced search
Recent Posts

 Todays Posts
 Most Active posts
 Posts since last visit
 My Recent Posts
 Mark posts read

Microsoft MVP

 

CSS and Javascript

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
Printable Version 

All Forums >> Web Development >> Cascading Style Sheets >> CSS and Javascript
Page: [1]
 
xx75vulcan

 

Posts: 25
Joined: 1/6/2006
From: Wildwood MO
Status: offline

 
CSS and Javascript - 6/5/2006 14:52:52   
Howdy!

I've got a javascript menu that was handed to me. I believe it was hand coded- but not sure.

I need to find a way to specify the font color and size of the menus.

Currently, the menu is embeded into an html page that links a CSS file. The BODY tag in the CSS file will tell the javascript menu what to do, but the problem is, i need the javascript menu to have different font than the rest of the HTML page.

How do I specify a new tag in the CSS file, OR how can i hard code the style in the Javascript menu?

Link to the page containing the menu. If you'd rather I post the whole Javascript I can do that too...

http://www.rockwood.k12.mo.us/default_copy.htm

Much Thanks!
Tailslide

 

Posts: 5915
Joined: 5/10/2005
From: Out here on the raggedy edge
Status: offline

 
RE: CSS and Javascript - 6/5/2006 15:01:49   
Hi

You seem to have 2 choices. You could either hard code it into the Javascript by finding where it says:

<div style="position:absolute; background:';


and adding in

font-family: Verdana, Arial, sans-serif;


for example, after the "absolute;" bit.

Or you could stick a div around the menu in the code like this:

<div id="mymenu">
<script language="JavaScript1.2" src="nav.js"></script>
</div> <!-- end mymenu -->


and then alter the font in the stylesheet like this:

#mymenu {font-family: Verdana, Arial, sans-serif;}


Obviously using whatever font-family you want! I'd tend to do the second one as it's less likely to go wrong.

_____________________________

"My strategy is so simple an idiot could have devised it"
Little Blue Plane Web Design | Blood, Sweat & Rust - A Land Rover restoration project

(in reply to xx75vulcan)
xx75vulcan

 

Posts: 25
Joined: 1/6/2006
From: Wildwood MO
Status: offline

 
RE: CSS and Javascript - 6/5/2006 15:12:34   
Wow- that worked fantastic! Much Thanks!

I don't suppose making the drop down menus appear to be slightly transparent would be that easy?

(in reply to Tailslide)
Tailslide

 

Posts: 5915
Joined: 5/10/2005
From: Out here on the raggedy edge
Status: offline

 
RE: CSS and Javascript - 6/5/2006 15:20:09   
quote:

ORIGINAL: xx75vulcan

Wow- that worked fantastic! Much Thanks!

I don't suppose making the drop down menus appear to be slightly transparent would be that easy?


(GULP!) Errrm it should be possible. Problem is that it's all hardcoded in the JS file - I had a quick look but I'm not great at Javascript so without fiddling for a couple of hours I couldn't tell you!

If the menus were assigned ids within the JS file then it'd be easy 'cos you could fiddle with the opacity within the stylesheet - but they don't appear to have ids...

My suggestion would be to take a copy of the js file then start fiddling with one of them trying to change the background colour of just the dropdown bit. When you do that then you'll have isolated the right component in the script and you should be able to add in the correct opacity rule in where it's got "<div style="blah blah blah;">"

_____________________________

"My strategy is so simple an idiot could have devised it"
Little Blue Plane Web Design | Blood, Sweat & Rust - A Land Rover restoration project

(in reply to xx75vulcan)
Page:   [1]

All Forums >> Web Development >> Cascading Style Sheets >> CSS and Javascript
Page: [1]
Jump to: 1





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts