JS Help
- Started
- Last post
- 8 Responses
- mikeim
How can I add a css style to my links in the following breadcrumb script?
- bulletfactory0
you can add a class name to the href to control from your style sheet
- mikeim0
example please..
- mikeim0
are you suggesting in my html?
i'm calling the js from an external file, and I'd like to apply the style in the js itself
- rafalski0
put the script call into a container, ie. DIV or P, style the both the [div] and [div a]
Adding styles to javascript is insane, just insane, not to mention bad practice and severe pain between butcheeks when updating
- mikeim0
gotcha.
thx.
- blaw0
yeah, you can't apply CSS info from within the JS, it has to be handled in the rendering document.
- rafalski0
yeah, you can't apply CSS info from within the JS, it has to be handled in the rendering document.
blaw
(Jun 8 07, 06:29)well, actually you can do whatever you please with the CSS using JS (add/remove/change styles, classes, id's and above all, fix CSS flaws), but in this case it seems to be a good idea not to overcomplicate things..