Click to See Complete Forum and Search --> : technical stuff
HTMLNovice
10-19-2003, 10:49 AM
I just learned HTML mostly the whole langugae and I dont get this CSS stuff. Like for cool text stuff. I figured out how to make text change changes + highlighted when you point your cursor at it but I put in 2 links in left.htm (the scroll bar naviagator, left frame, page is divided 85%, 15%, 15% being the left.htm) but the 2 links appear different colors ! I don tget this because they both have the same code.
I went to that www.w3school.com place and its alright just I dont get the external technial stuff, its hard.
Thanks all
HTMLNovice
10-19-2003, 10:54 AM
Originally posted by HTMLNovice
I just learned HTML mostly the whole langugae and I dont get this CSS stuff. Like for cool text stuff. I figured out how to make text change changes + highlighted when you point your cursor at it but I put in 2 links in left.htm (the scroll bar naviagator, left frame, page is divided 85%, 15%, 15% being the left.htm) but the 2 links appear different colors ! I don tget this because they both have the same code.
I went to that www.w3school.com place and its alright just I dont get the external technial stuff, its hard.
Thanks all
basically I'm try ing to say I've tried to learn a programming language for along time, and I don't know much about how a computer ticks, what exteral means, what internal errors mean, "Runtime error" I dont know, and apparently you need to know this kinda tech stuff in order to know CSS and I just dont. I tried C++ its to hard and I finally grasphed html and now this css blows me away :(
MotherNatrsSon
10-19-2003, 01:36 PM
Got a link to your page?
MNS
HTMLNovice
10-19-2003, 01:43 PM
Originally posted by MotherNatrsSon
Got a link to your page?
MNS
<i><b> Yeah I do, http://www.angelfire.com/rpg2/gs4merch </b></i>
HTMLNovice
10-19-2003, 01:46 PM
one of the things I want is do this: Instead of making the links on the left turn purple when you point your cursor at them, I want them also underlined but ONLY when you point your cursor at them. (Currently they're underlined even if you dont point your cursor at them) anyone know how to do this?
thx
MotherNatrsSon
10-19-2003, 02:09 PM
Originally posted by HTMLNovice
one of the things I want is do this: Instead of making the links on the left turn purple when you point your cursor at them, I want them also underlined but ONLY when you point your cursor at them. (Currently they're underlined even if you dont point your cursor at them) anyone know how to do this?
thx
In you left.htm page you have the styles in the head where they belong but then for some reason you also inserted them in the body where they do not belong..
Only between the <head> and </head> tags or in an external file.
This is you CSS:
<style type="text/css">
a:link {color: #FF0000}
a:visited {color: #00FF00}
a:hover {color: #FF00FF}
a:active {color: #0000FF}
</style>
To not have links underlined until you mouseover them change it to this:
<style type="text/css">
a:link {color: #FF0000; text-decoration: none}
a:visited {color: #00FF00}
a:hover {color: #FF00FF; text-decoration: underline}
a:active {color: #0000FF}
</style>
The reason they appear different colors is because on you have visited(been to) and one you have not. If you want them the same color after you have "visited" a link you will need to change the color for the a:visited to the same color as a:link.
MNS
spufi
10-19-2003, 04:20 PM
Like MNS said, if you only what the one color to happen only when a person is hovered over it, and any other time you want it to be a different one, you can code it like this...
a { color:#F00; text-decoration: none; }
a:hover { color:#F0F; text-decoration: underline; }
Change colors as needed. Just using the letter "a" sets the properties for all of your links in any state. The "a:hover" defines the properties only when I person hovers over it. #F00 is just #FF0000 in a shorthand version.
HTMLNovice
10-19-2003, 04:42 PM
thanks do you know of people can make big bucks making webpages?
HTMLNovice
10-19-2003, 04:43 PM
Originally posted by MotherNatrsSon
In you left.htm page you have the styles in the head where they belong but then for some reason you also inserted them in the body where they do not belong..
Only between the <head> and </head> tags or in an external file.
This is you CSS:
<style type="text/css">
a:link {color: #FF0000}
a:visited {color: #00FF00}
a:hover {color: #FF00FF}
a:active {color: #0000FF}
</style>
To not have links underlined until you mouseover them change it to this:
<style type="text/css">
a:link {color: #FF0000; text-decoration: none}
a:visited {color: #00FF00}
a:hover {color: #FF00FF; text-decoration: underline}
a:active {color: #0000FF}
</style>
The reason they appear different colors is because on you have visited(been to) and one you have not. If you want them the same color after you have "visited" a link you will need to change the color for the a:visited to the same color as a:link.
MNS
ok few questions. what is a style. and what does text/css mean? and whats that a before the : mean? if it means anchor why dont you have an /a?
HTMLNovice
10-19-2003, 04:47 PM
Originally posted by HTMLNovice
ok few questions. what is a style. and what does text/css mean? and whats that a before the : mean? if it means anchor why dont you have an /a?
for (i = 0; i < fields ; i++) {
switch (document.form1.elements[i].type){
case "select-one" :
case "select-multiple" :
if (document.form1.elements[i].selectedIndex != -1)
{
empty = false
}
break;
case "checkbox" :
if ( document.form1.elements[i].checked) {
empty = false
}
break;
default :
break;
}
}
this looks real weird I viewd the source code. What does the
{} mean?
for (i = 0; i < fields ; i++) {
this equation doesnt make any sense either? Can som eone help explain?
spufi
10-19-2003, 04:57 PM
Originally posted by HTMLNovice
ok few questions. what is a style. and what does text/css mean? and whats that a before the : mean? if it means anchor why dont you have an /a?
Style means the style(look, design, layout) of the content. "text/css" is saying that the type of code that is being used to describe the style is in text form and is written in CSS. The "a" before the ":" means that it is in regards to the "a" tag, aka <a>.
spufi
10-19-2003, 05:03 PM
Originally posted by HTMLNovice
for (i = 0; i < fields ; i++) {
switch (document.form1.elements[i].type){
case "select-one" :
case "select-multiple" :
if (document.form1.elements[i].selectedIndex != -1)
{
empty = false
}
break;
case "checkbox" :
if ( document.form1.elements[i].checked) {
empty = false
}
break;
default :
break;
}
}
this looks real weird I viewd the source code. What does the
{} mean?
for (i = 0; i < fields ; i++) {
this equation doesnt make any sense either? Can som eone help explain?
The code is JavaScript, not to be confused with Java. The line in question is a "for" loop. It repeats all of the code within the "{}" bracket until certain conditions are met. In the case, the for loop statement reads like this...
Set i equal to zero. For as long as the value of i is less than the value that is contained in the variable fields, perform the loop. Once you have performed the loop once, add one to the value of i. The loop statement is basic JavaScript code.
HTMLNovice
10-25-2003, 03:13 PM
:(
I want to change the color of it to make it white before you point your mouse on it then red when you do. Right now its green and purple, bad mix :(
I can't get it to change, I put in the right hex, it just isn't working. Help?
<html>
<head>
<style type="text/css">
a:link {color: #FFF; text-decoration: none; }
a { color:#F00; text-decoration: none; }
a:hover { color:#FF0; text-decoration: underline; }
a:active {color: #0000FF}
</style>
</head>
<body bgcolor="#000000">
<p><b><a href="http://www.angelfire.com/rpg2/gs4merch/Cool_stuff.htm
" target="mainwindow">Cool Stuff
</a>
</b>
</p>
<style type="text/css">
a:link {color: #FF0000}
a:visited {color: #00FF00}
a:hover {color: #FF00FF}
a:active {color: #0000FF}
</style>
<p><b><a href="http://www.angelfire.com/rpg2/gs4merch/Bugs.htm"
target="mainwindow">Bugs
</a>
</b>
</p>
</body>
</html>
DaveSW
10-25-2003, 03:35 PM
Try this
<html>
<head>
<style type="text/css">
body {background-color: #000000;}
a:link {color: #FFF; text-decoration: none; font-weight: bold;}
a:visited { color:#FFF; text-decoration: none; font-weight: bold;}
a:hover { color:#ff0000; text-decoration: underline; font-weight: bold;}
a:active {color: #0000FF; font-weight: bold;}
</style>
</head>
<body>
<div><p><a href="http://www.angelfire.com/rpg2/gs4merch/Cool_stuff.htm
" target="mainwindow">Cool Stuff
</a></p>
<p><a href="http://www.angelfire.com/rpg2/gs4merch/Bugs.htm"
target="mainwindow">Bugs</a></p></div>
</body>
</html>
You need only specify the styles once. You've specified them twice...
Also,
a:link - what you get before you do anything
a:visited - after you've been to that page
a:hover - when the mouse is over it
a:active - when the mouse button is actually depressed.
Does that help at all?
HTMLNovice
10-25-2003, 04:18 PM
Yes, it helps, but, few questions:
<html>
<head>
<style type="text/css">
body {background-color: #000000;}
a:link {color: #FFF; text-decoration: none; font-weight: bold;}
a:visited { color:#FFF; text-decoration: none; font-weight: bold;}
a:hover { color:#ff0000; text-decoration: underline; font-weight: bold;}
a:active {color: #0000FF; font-weight: bold;}
</style>
</head>
a:link and a:vistied both have the hex #FFF, I'm pretty sure this means white. For a:hover could I make it #FF0, instead of #FF0000, are they the same thing?
Also, on a:active, could I do #0FF instead of #0000FF?
Oh, and I'm not sure what font-weight means, explain?
Thanks!!
DaveSW
10-27-2003, 02:54 AM
a:link and a:vistied both have the hex #FFF, I'm pretty sure this means white.
it does - a:link is one that hasn't been clicked. a:visited has been clicked before - it's somewhere you're visited. Basically they both need to be white, unless you want to have visited links a different color.
For a:hover could I make it #FF0, instead of #FF0000, are they the same thing?
No:#F00
Also, on a:active, could I do #0FF instead of #0000FF?
No: #00F
Oh, and I'm not sure what font-weight means, explain?
Font-weight:bold;
Can you guess? It makes it bold. In you code you had the <b> tags to make it bold. I took them out and replaced them with the css equivalent, font-weight:bold;
see
http://www.w3.org/TR/CSS2/fonts.html#select
font-weight is part way down.
HTMLNovice
10-27-2003, 10:07 PM
I dont understand why people say CSS and HTML isnt programming. It uses many things that programming uses ..
For example, in cc+ you use ; and starting brackets and ending brackets
//Passing by reference
#include <iostream>
using namespace std;
void swap(int *x, int *y);
int main()
{
int x = 5, y=10;
cout << "Main.Before swap, x: " << x << "y:"<<y<<"\n";
swap(&x, &y);
cout << "Main. After swap, x: " << x << " y: " << y << "\n";
return 0;
}
void swap (int *px, int *py)
{
int temp;
cout << "Swap. Before swap, *px: " << *px <<
" *py: " << *py << "\n";
temp = *px;
*px = *py;
*py = temp;
cout << "Swap. After swap, *px: " << *px <<
" *py << "\n";
}
:Pant:pant:
I just dont understand why HTML and CSS arent programming.
MotherNatrsSon
10-27-2003, 10:28 PM
HTML = Hyper Text Mark-u Language
CSS= Cascading Style Sheet
They are "languages" but do not do any actual "programming". They are for presentaion purposes only.
What you can do with C++ you couldn't do with either HTML, XHTML, or CSS.
MNS
DaveSW
10-28-2003, 04:15 AM
Do you see why the colors were wrong?