Click to See Complete Forum and Search --> : Incorportating HTML


XaieL
12-02-2003, 12:13 PM
Yeah well I had someone help me out before, so I got down the easy part, and have shortened it into just Basic code, but am not sure which color is which or how to put it in.

What i want to do it make all font color White and have the entire Backround blue.. Me being a Js newbie, I don't quite know how to do that. appreciate any one's help with this

<html>
<head>
<title>Horoscopes</title>

<script language="Javascript">
<!--hide me
//get a name
var name = prompt("What's your name?", "")
var month = prompt("What month were you born (numer, from 1 to 12)?", "")

var phrases=new Array()
phrases[1]="Horoscope for January 20-February 18 *Sign is Aquarius* ";
phrases[2]="Horoscope for February 19-March 20 *Sign is Pisces* - ";
phrases[3]="Horoscope for March 21-April 19 *Sign is Aries* - ";
phrases[4]="Horoscope for April 20-May 20 *Sign is Taurus* - ";
phrases[5]="Horoscope for May 21-June 21 *Sign is Gemini* - ";
phrases[6]="Horoscope for June 22-July 22 *Sign is Cancer* - ";
phrases[7]="Horoscope for July 23-August 22 *Sign is Leo* - ";
phrases[8]="Horoscope for August 23-September 22 *Sign is Virgo* - ";
phrases[9]="Horoscope for September 23-October 22 *Sign is Libra* - ";
phrases[10]="Horoscope for October 23 - November 21 *Sign is Scorpio* - ";
phrases[11]="Horoscope for November 22-December 21 *Sign is Saggitarius* - ";
phrases[12]="Horoscope for December 22-January 19 *Sign is Capricorn* - ";

//go on up to december
write=name+", ";
for(i=1;i<13;i++){
if(month==i){
write+=phrases[i]
break;
}
}
document.write(write);


//stop hiding me-->
</script>
</head>
<body>
</body>
</html>

XaieL
12-02-2003, 12:15 PM
Whee Cant find the edit button

It's something liek <tr bgcolor="CCCFF"> or something for Backround if i remember correctly, but it doesnt work leading me to believe it's wrong, ..if anyone sees anything Messy or wrong with my program, point it out to me so I can try to fix it :P
Thanks :)

Pittimann
12-02-2003, 01:36 PM
Hi!

I've entered my name in the first and my month of birth in the second prompt and the text I read after that was the one you wanted me to read (like expected).

Can you describe your color problem a bit more detailed? Like: whole document background color has to be blue, all the text white... or something within a table...

Cheers - Pit

fredmv
12-02-2003, 01:51 PM
<style type="text/css">
/*<![CDATA[*/
html, body {
background-color: #00f;
color: #fff;
}
/*]]>*/
</style>

XaieL
12-04-2003, 11:59 AM
alright well I've incorportated what I've been given (Thanks a lot people :D) and now want to import a border for the top of my page.

<href="urlhere"> ...i'm guessing that wouldnt be right?

http://www.sfgoth.com/~perki/resume/samples/horoscope.gif

^- That's the image I'd like to input.

..should it be <h1>http://www.sfgoth.com/~perki/resume/samples/horoscope.gif</h1> or what? Thanks guys.

XaieL
12-04-2003, 12:24 PM
Besides the above..i have one more thing I'd like to do.

I'd like to incorportate a small logo (each astrological sign)

Right before the Horoscope of the day so for instance we'll let ® = the Logo.

® You will Die a Terrible Terrible Death.


Thanks for the help guys (and/or girls :P)

XaieL
12-05-2003, 12:20 PM
Bump >.<

ray326
12-05-2003, 02:09 PM
Put the horoscope text into a <li> with an id and define the bullet for a <li> with that id to be the associated astro icon.

li#aries {
list-style-image: url(images/ariesbullet.gif);
}
li#taurus {
list-style-image: url(images/taurusbullet.gif);
}

And in the page,

<ul>
<li id="aries">Don't butt heads with your boss!</li>
<li id="taurus">Bully day all round!</li>
</ul>

Obviously you can (and SHOULD) define all the other aspects of how the list should be presented in the style sheet, too.

Paul Jr
12-05-2003, 03:09 PM
Well, for one, it didn't work for me.
Kept giving me the horoscope for June 22-July 22, saying my sign is Cancer -- it's actually Gemini.