rkosh
May 8 2005, 12:49 AM
| | Here's the code I'm using for my javascript link I decided to add to a website I'm working on:
<li><a type="button" href="java script: history.go(-1)">Go Back</a></li>
The problem is that the css doesn't affect the javascript link. It displays as a plain blue underlined link. The stylesheet correctly renders regular links to other pages in the site, so the problem doesn't lie in my CSS coding. Thanks for the help. |
Comment/Reply (w/o sign-up)
Maybe you should add the style straight into the <A> code? Like <a type="button" href="java script:history.go(-1)" style="color: ... ... ">. I don't quite understand the "button" bit.. If its meant to be a button, isn't it meant to be a button instead of underlined text? When I used the text link for "go back" on one of my sites some time back I believe the CSS had no problems with javascript.
Comment/Reply (w/o sign-up)
overture
May 8 2005, 09:15 AM
normal hyperlinks reference: CODE a:link, a:visited, a:active { [tab][/tab]color: #000000; [tab][/tab]font-weight: none; [tab][/tab]text-decoration: underline; }
a:hover { [tab][/tab]color: #880000; [tab][/tab]text-decoration: none; } ---------------------------- i just tested it and it works fine for me. try adding this in the css page: CODE li a:link, li a:visited, li a:active { [tab][/tab]color: #000000; [tab][/tab]font-weight: none; [tab][/tab]text-decoration: underline; } li a:hover { [tab][/tab]color: #880000; [tab][/tab]text-decoration: none; } so if a link is within the <li></li> tags then it will be formatted to whatever you put into the code i have given above. what browser are you using? it works for me fine in IE and FF.
Comment/Reply (w/o sign-up)
pbolduc
May 8 2005, 11:08 AM
QUOTE (rkosh @ May 7 2005, 05:49 PM) Here's the code I'm using for my javascript link I decided to add to a website I'm working on: <li><a type="button" href="java script: history.go(-1)">Go Back</a></li> The problem is that the css doesn't affect the javascript link. It displays as a plain blue underlined link. The stylesheet correctly renders regular links to other pages in the site, so the problem doesn't lie in my CSS coding. Thanks for the help. You can also simply add a class property to your link: CSS Code: CODE a.whateverclass:link {color: #000066; text-decoration: none}
a.whateverclass:visited {color: #000066; text-decoration: none}
a.whateverclass:hover {color: #006600; text-decoration: underline}
a.whateverclass:active {color: #FFFF00; text-decoration: none} Link Code: CODE <li><a type="button" href="javascript: history.go(-1)" class="whateverclass">Go Back</a></li> Hope This Helps, pete
Comment/Reply (w/o sign-up)
rkosh
May 8 2005, 08:41 PM
I'm such an idiot! I just realized I specified "type" instead of "class" on that link!!!. Thanks pbolduc!
Comment/Reply (w/o sign-up)
Similar Topics
Keywords : javascript, disables, css, link
- Javascript Problem
(3)
Xhtml, Javascript, Css And Frames.
(0) Hello, I am building a form where a user selections several options (it uses javascript to modify
checkbox values based on other selections). At the end I need to re-generate html code based on the
selected form values, I don't particularly care what way it's done (although my site is
XHTML 1.0 Transitional), but I need it to update on the fly as they change options. The HTML code
is Google AdSense code, and I am trying to build my own from to generate all the different ad types
and generate the code (it's not just for me). What kind of options do I have?....
Ie Png Transparency Javascript?
is there one? (3) im working on a new design for my website but i need to be able to have transparent pngs. its all
fine in firefox and i think IE 7 it works, but IE 6, cos i no half the people that will be going on
my site will use internet explorer 6. so basically, does anyone know any javascript that will make
transparent PNG's work on internet explorer? id use gif but i dont just want a transparent
background. also, id use CSS and just gifs but i need some of it to not be transparent, lol im
fussy. so if you know anything please tell me, i gave up on javascript, its too hard. ....
Can I Make A Webpage With Javascript
title kinda says it all (9) ok, i plan to make a game, and i was wondering if i can make my webpage in javascript, i just
started learning it for this massive enderour i plan to over take, and i wanted to know if it was
possible lol. im also learning php and mysql. Thanks, Zemon1....
Imagemap With Image As Other Link
(0) Hi, I have an imagemap with a couple of links to other pages, but I would also like the whole image
to be a link, for example the code below My
aim is to have a user brought to link2 or link3 by clicking on the specific areas of the map, or
else brought to link1 by clicking anywhere else. This works in FireFox 2.0, but Internet Explorer 6
ignores the link1. I can achieve the effect that I am looking for by defining an AREA on the
imagemap that covers all the image, and is overridden by the specific areas, but the li....
Javascript Show / Hide Functions
need some fine-tuning (3) Searching before posting my topic, i found this very helpful post. Javascript show + hide
However, I'm still muddling around trying to fine tune it, and since i'm no good at coding,
I'd appreciate any help. Using that example, how do I get the div text to be hidden on loading,
rather than showing it all at page load. Also, is there a way to have the text change when clicked?
so that for example, it would say "expand" when it's the small amount of text, and "collapse"
when it's the full text? ....
Where To Get Chat/Guestbook/Photo Album etc. Scripts?
javascript and flah chat , guestbook, photo album and other (4) Post here some links where u can download flash or javascript chat , guestbook, photoalbum, forum
... etc ......
1 Joomla Skin For Flash Animated Portals: Mbt_macro_blue
a genius link of macroblue theme for mambo & joomla to insert flas (0) download joomla portal soulware in this link:
http://developer.joomla.org/sf/frs/do/list..._8_spanish_hack (this host is great to work whit
this systems content managers) then download and install the next macrobulue theme in your ftp
directory (i recomend for fast installations www.web2ftp.com), the mbt_macro_blue is a template
designes whit flash to perform ure movement animations... download here:
http://www.joomlaos.de/option,com_remosito...7bc9781a49.html and for get ideas and logos, please
visit www.flashkit.com reggards. /wub.gif" style="vertical-ali....
JavaScript
(1) Is there any place that i can get javascript from to use on my web page? Also are there any
tutorials on how to write javascript. I have no idea how it works and would be greatful for any help
that i can get. Thanx....
Get Input From Html/txt File?
with just html/css and maybe javascript? (2) I was just wondering if it's possible to retrieve text (and maybe images) from a .html or .txt
file. So for example you get the header and footer from an external file. Is it possible with just
html/css and maybe a little javascript or does it require server side scripting like php???
-=jeroen=-....
Hiding/showing Text On Click
is it possible with css/javascript (2) Ok, I got an question: I want to make a site with a news box or something similar. It's gonna be
a table with a small piece of text and an "read more" button. Now I want to make it so that if
people click on the "read more" there will appear an other piece of text underneath it. How do I do
this? thanks in advance, -=jeroen=-....
Random Images On Eacht Pageload And Refresh.
best in plain htlm or javascript (7) Im looking for somethin that puts a diffrent image for each pageload/refresh. And it should be
something that dosent need any super server technolgys like php and mysql and all that stuff.
something that is enough just on the page and finished.....
Find Out Dead Links In Your Site Automatically
Want to see a dead link on your site? (11) If you try to go to http://www.dead-links.com you will be asked for your domain or url. Enter it
and the bot will find any dead links that you might not have seen. Have a nice day.......
What Is The Best Javascript Menu Builder?
(7) I really need a free, cool and easy-to-integrate JAVASCRIPT menu builder for my new site. I mean
free to use as in unlimitated use provided i link the producer's site to my menu. Anyway if
someone knows anything pleas help. Thanks !!....
Javascript
Do you use javascript in your page ? (20) Hi , I begin to use Javascript recently. I understand very well and I'm already able to make
little scripts. I like Javascript , it adds interactivity to the page. But sometimes , it is not so
good ( Alerts while a page is loading ) So when do you use it , and when do you think Javascript is
the most useful on a page. Thanks Mathieu....
JavaScript template
(1) to begin a javascript template, you will need to begin with this code.... Untitled
Document ....
Dynamic ASP Javascript
(0) to begin a dynamic ASP Javascript you will need to begin with this code..... Untitled
Document ....
CSS Link Problem
(1) I have multiple links on my page, but a few of them are in a table with a dark background, while
others are on a light background. I have them in css sheets, but I was wondering how you would go
about creating them so that the link color, active link, and visited link are different for both of
them?....
Looking for javascript, disables, css, link
|
See Also,
*SIMILAR VIDEOS*
Searching Video's for javascript, disables, css, link
|
advertisement
|
|