Code Newbie
News     Forums     Search     Members     Sign Up    

My Code Newbie
Username

Password

Articles/Snippets
ASP Classic
ASP.NET
C
C#
C++
HTML / CSS
Java
Javascript
Linux / BSD
Perl
PHP
Python
Ruby
SQL
VB 6
VB.NET

C.N. Friends
  Planet Rome

Link to Us!
Code Newbie
  Code Newbie
    forums
Old 05-11-2004, 03:32 AM   #1 (permalink)
sharmap
Registered User
 
Join Date: May 2004
Posts: 3
sharmap is on a distinguished road
Angry CCS / Style issue

hi
need some help on implemting style's

Header contains following code: //

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" href="somestylefile" type="text/css">
</head>

<body bgcolor="#FFFFFF" text ="#000000" >

//

This style fine uses the:
a.link
a.over ect..

I'm trying to run a .js menu with other style settings applied to the menu links. This .js script contains text-decoration:none like: //

document.write('a.SMN17519520 {text-decoration:none; color:#1813B5; font-weight: 700; font-family: Verdana; font-size: 15px; font-style:normal;} ');
document.write('a.SMN17519520:hover {text-decoration:none; color:#FF0F0F; }'); //

whats happening is that the default a. class style is still being applied to the .js menu overwriting the setting in the .js menu file..

Any idea for me where to look

TIA

Sharmap
sharmap is offline   Reply With Quote
Old 05-11-2004, 09:59 AM   #2 (permalink)
Rotkiv
Code Monkey
 
Rotkiv's Avatar
 
Join Date: Apr 2004
Location: Silicon Valley, CA
Posts: 59
Rotkiv is on a distinguished road
Send a message via AIM to Rotkiv Send a message via MSN to Rotkiv
I'm lost. why do you need javascript to impliment the stylesheet?

Quote:
I'm trying to run a .js menu with other style settings applied to the menu links. This .js script contains text-decoration:none like: //

document.write('a.SMN17519520 {text-decoration:none; color:#1813B5; font-weight: 700; font-family: Verdana; font-size: 15px; font-style:normal;} ');
document.write('a.SMN17519520:hover {text-decoration:none; color:#FF0F0F; }'); //

whats happening is that the default a. class style is still being applied to the .js menu overwriting the setting in the .js menu file..

Any idea for me where to look
i have no idea what's going on in there.
Rotkiv is offline   Reply With Quote
Old 05-11-2004, 10:12 AM   #3 (permalink)
sharmap
Registered User
 
Join Date: May 2004
Posts: 3
sharmap is on a distinguished road
Hi,
I am using the java script to implement a menu system.
The java sourve was generated bij a menu generation application. But the style defined in the generated menu .js file is not showing Up. Instead the default document style shows Up in the menu.

tia

sharmap
sharmap is offline   Reply With Quote
Old 05-11-2004, 10:41 AM   #4 (permalink)
sde
Moderator
 
sde's Avatar
 
Join Date: May 2002
Location: us.ca
Posts: 4,446
sde is on a distinguished road
what do the links that the .js file look like? is it calling the SMN17519520 class when it prints the anchor tag?
__________________
Mike
sde is offline   Reply With Quote
Old 05-11-2004, 11:18 AM   #5 (permalink)
sharmap
Registered User
 
Join Date: May 2004
Posts: 3
sharmap is on a distinguished road
Hi,
This is all the html code the menu provides
How do I implement this style while maintaining the other style settings in my ccs file

<STYLE TYPE='text/css'>#DM22229266 {visibility:hidden;}</STYLE>

<SCRIPT SRC="mymenu.js"></SCRIPT>

Tia

Sharma
sharmap is offline   Reply With Quote
Old 05-11-2004, 12:08 PM   #6 (permalink)
sde
Moderator
 
sde's Avatar
 
Join Date: May 2002
Location: us.ca
Posts: 4,446
sde is on a distinguished road
if you have 2 definitions of the a tag, then your browser will most likely use the one that was declared last.

which one do you want to choose? whatever the answer to that is, then you probably have to include that script ( or style sheet ) last.

you may have to just open up mymenu.js in a text editor and find where they are using a normal a tag <a href=something.html>asf</a> , and add a new class in there <a class=nav href=someting.html>asf</a>

does that help?
__________________
Mike
sde is offline   Reply With Quote
Old 06-18-2004, 08:03 AM   #7 (permalink)
sammy
Code Monkey
 
sammy's Avatar
 
Join Date: Jun 2004
Location: Brooklyn/Rochester
Posts: 53
sammy is on a distinguished road
Send a message via AIM to sammy
Browser implements depending on scope.
based on where the style is written

external file: lowest priority
header : medium
inline : highest

so if you have an external stylesheet and it tells a tags to have no decoration, but you have an inline style that tells it to have decoration, the a tag will have decorations.
__________________
sammy is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
OpenGL.dll Mr.Anderson Platform/API C++ 3 08-13-2004 10:07 AM
perplexing issue with some calculations sarah31 PHP 9 07-12-2004 09:43 AM
php/frontpage webbot issue sarah31 PHP 4 06-30-2004 09:44 AM


All times are GMT -8. The time now is 01:53 AM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.0 RC8





Copyright © 2000-2008, Milano Interactive
Web Hosting provided by Portal 360 Web Hosting