You are not logged in.

#1 2005-05-15 07:01:27

dtw
Forum Fellow
From: UK
Registered: 2004-08-03
Posts: 4,431
Website

css and a crappy bit of .js

how do imbed this in a css?

 <script type="text/javascript" src="http://www.makepovertyhistory.org/whiteband_small_right.js">
</script><noscript><a href="http://www.makepovertyhistory.org/">
http://www.makepovertyhistory.org</a></noscript>

i'd rather not have .js running but hey, i want to help!

Offline

#2 2005-05-15 09:21:54

cactus
Taco Eater
From: t͈̫̹ͨa͖͕͎̱͈ͨ͆ć̥̖̝o̫̫̼s͈̭̱̞͍̃!̰
Registered: 2004-05-25
Posts: 4,615
Website

Re: css and a crappy bit of .js

"What you talkin' bout dibble"?

Embed javascript in css (ie cascading style sheet)? ummm...What?!?


"Be conservative in what you send; be liberal in what you accept." -- Postel's Law
"tacos" -- Cactus' Law
"t̥͍͎̪̪͗a̴̻̩͈͚ͨc̠o̩̙͈ͫͅs͙͎̙͊ ͔͇̫̜t͎̳̀a̜̞̗ͩc̗͍͚o̲̯̿s̖̣̤̙͌ ̖̜̈ț̰̫͓ạ̪͖̳c̲͎͕̰̯̃̈o͉ͅs̪ͪ ̜̻̖̜͕" -- -̖͚̫̙̓-̺̠͇ͤ̃ ̜̪̜ͯZ͔̗̭̞ͪA̝͈̙͖̩L͉̠̺͓G̙̞̦͖O̳̗͍

Offline

#3 2005-05-15 10:54:00

dtw
Forum Fellow
From: UK
Registered: 2004-08-03
Posts: 4,431
Website

Re: css and a crappy bit of .js

that's a no then!

what do i gotta do then?

Offline

#4 2005-05-15 14:05:27

beniro
Member
From: St. Petersburg, FL, USA
Registered: 2002-12-31
Posts: 312

Re: css and a crappy bit of .js

I'm having a hard time understanding what you're asking.  Could you rephrase the question?

I see that you are calling a javascript file that just writes the HTML fopr an image, and a map to the document.  If the user has no script support, a link is all that's there.  Is that what you want to accomplish without JS?

Offline

#5 2005-05-15 14:17:46

i3839
Member
Registered: 2004-02-04
Posts: 1,185

Re: css and a crappy bit of .js

Try something like:

sometag {
        content: '<script type="text/javascript" src="http://www.makepovertyhistory.org/whiteband_small_right.js">
</script><noscript><a href="http://www.makepovertyhistory.org/">
http://www.makepovertyhistory.org</a></noscript>'
}

You may need to struggle with the "'s a bit, perhaps escape them or something.

Though it's probably not the best way to fix the problem. You can use nested HTML objects to try different things out.

Offline

#6 2005-05-16 04:44:25

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: css and a crappy bit of .js

Well, here's the text of the js file...
and the css is here: http://www.makepovertyhistory.org/whiteband.css

<style><!--
@import url(http://www.makepovertyhistory.org/whiteband.css);
--></style>

<div class="MPHWhiteBandSmallRight">
<img src="http://www.makepovertyhistory.org/whiteband_mphtranslinkimg.gif" 
width="163" height="163" border="0" usemap="#MPHLinkMapSmallRight" class="mphimage"></div>
<map name="MPHLinkMapSmallRight"><area shape="poly" coords="0,0,163,163,163,133,30,0" 
href="http://www.makepovertyhistory.org/" target="_blank"></map>

that should get rid of the javascript dependancy

Offline

#7 2005-05-16 06:59:21

dtw
Forum Fellow
From: UK
Registered: 2004-08-03
Posts: 4,431
Website

Re: css and a crappy bit of .js

appreciate all your help so far but it's all still a bit greek and it has been far too long a week - so here is my .css

http://dtw.jiwe.org/e107_themes/e107v4a/style.css

if someone could fill in the blanks i'd be eternally grateful and even put your name on my site smile

Offline

#8 2005-05-16 07:23:07

cactus
Taco Eater
From: t͈̫̹ͨa͖͕͎̱͈ͨ͆ć̥̖̝o̫̫̼s͈̭̱̞͍̃!̰
Registered: 2004-05-25
Posts: 4,615
Website

Re: css and a crappy bit of .js

I still don't understand what you are after here dibble. Are you just trying to use a style sheet for a website?

<html>
<head>
<link rel="stylesheet" type="text/css" href="http://dtw.jiwe.org/e107_themes/e107v4a/style.css ">
</head>
<body>
blah!
</body>
</html>

"Be conservative in what you send; be liberal in what you accept." -- Postel's Law
"tacos" -- Cactus' Law
"t̥͍͎̪̪͗a̴̻̩͈͚ͨc̠o̩̙͈ͫͅs͙͎̙͊ ͔͇̫̜t͎̳̀a̜̞̗ͩc̗͍͚o̲̯̿s̖̣̤̙͌ ̖̜̈ț̰̫͓ạ̪͖̳c̲͎͕̰̯̃̈o͉ͅs̪ͪ ̜̻̖̜͕" -- -̖͚̫̙̓-̺̠͇ͤ̃ ̜̪̜ͯZ͔̗̭̞ͪA̝͈̙͖̩L͉̠̺͓G̙̞̦͖O̳̗͍

Offline

#9 2005-05-16 07:27:10

dtw
Forum Fellow
From: UK
Registered: 2004-08-03
Posts: 4,431
Website

Re: css and a crappy bit of .js

LOL - i have a website that uses stylesheets, the .css is linked above - i want to add that bit of .js to it as it is a link for a project i want to support

Offline

#10 2005-05-16 08:59:52

cactus
Taco Eater
From: t͈̫̹ͨa͖͕͎̱͈ͨ͆ć̥̖̝o̫̫̼s͈̭̱̞͍̃!̰
Registered: 2004-05-25
Posts: 4,615
Website

Re: css and a crappy bit of .js

I still don't seem to be understanding what you are trying to accomplish...oh well, call me a wash on this one then. No matter.

Maybe phrak can help.


"Be conservative in what you send; be liberal in what you accept." -- Postel's Law
"tacos" -- Cactus' Law
"t̥͍͎̪̪͗a̴̻̩͈͚ͨc̠o̩̙͈ͫͅs͙͎̙͊ ͔͇̫̜t͎̳̀a̜̞̗ͩc̗͍͚o̲̯̿s̖̣̤̙͌ ̖̜̈ț̰̫͓ạ̪͖̳c̲͎͕̰̯̃̈o͉ͅs̪ͪ ̜̻̖̜͕" -- -̖͚̫̙̓-̺̠͇ͤ̃ ̜̪̜ͯZ͔̗̭̞ͪA̝͈̙͖̩L͉̠̺͓G̙̞̦͖O̳̗͍

Offline

#11 2005-05-16 14:39:04

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: css and a crappy bit of .js

dibblethewrecker wrote:

LOL - i have a website that uses stylesheets, the .css is linked above - i want to add that bit of .js to it as it is a link for a project i want to support

oh... well, just add that line you posted where you want the link... that should do it...
Now, the js doesn't do anything except write some crap to the page (god, I hate that)... so I'd tear it apart like so:

<html>
<head>
<link rel="stylesheet" type="text/css" href="http://dtw.jiwe.org/e107_themes/e107v4a/style.css" >
<link rel="stylesheet" type="text/css" href="http://www.makepovertyhistory.org/whiteband.css" >
</head>
<body>
Hello, this is the body:
<table><tr><td>Column A</td><td>Column B</td></tr>
<tr>
<td colspan="2">
<!-- Here is the thing dibble wanted -->
<div class="MPHWhiteBandSmallRight">
<img src="http://www.makepovertyhistory.org/whiteband_mphtranslinkimg.gif"
width="163" height="163" border="0" usemap="#MPHLinkMapSmallRight" class="mphimage"></div>
<map name="MPHLinkMapSmallRight"><area shape="poly" coords="0,0,163,163,163,133,30,0"
href="http://www.makepovertyhistory.org/" target="_blank"></map>
<!-- End dibble thing -->
</td>
</tr></table>
</body>
</html>

try that, let me know if that's acceptable...

Offline

#12 2005-05-17 02:55:57

dtw
Forum Fellow
From: UK
Registered: 2004-08-03
Posts: 4,431
Website

Re: css and a crappy bit of .js

So just paste that in the .css?  Sorry guys, i'd do my reading about it but it just one little thing that'll do if it's easy and not bother if it's not

Very much appreciate your help  big_smile

Offline

#13 2005-05-17 04:32:38

Shofs
Member
From: Central Illinois
Registered: 2004-12-15
Posts: 184

Re: css and a crappy bit of .js

Why don't you .php-ify your css. Have php generate your css file dynamically.

Offline

#14 2005-05-17 05:06:32

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: css and a crappy bit of .js

dibblethewrecker wrote:

So just paste that in the .css?  Sorry guys, i'd do my reading about it but it just one little thing that'll do if it's easy and not bother if it's not

Very much appreciate your help  big_smile

well, you can use more than one css file... in this case, I'd say either add:

<link rel="stylesheet" type="text/css" href="http://www.makepovertyhistory.org/whiteband.css" >

or at the end of your css file

@import url("http://www.makepovertyhistory.org/whiteband.css")

then, where you want the link, just add:

<div class="MPHWhiteBandSmallRight">
<img src="http://www.makepovertyhistory.org/whiteband_mphtranslinkimg.gif"
width="163" height="163" border="0" usemap="#MPHLinkMapSmallRight" class="mphimage"></div>
<map name="MPHLinkMapSmallRight"><area shape="poly" coords="0,0,163,163,163,133,30,0"
href="http://www.makepovertyhistory.org/" target="_blank"></map>

Offline

Board footer

Powered by FluxBB