Click to See Complete Forum and Search --> : Font Color Problem - Css?
Wasiu0607
07-16-2003, 05:31 PM
I have a problem with my font color. Note that I use Frames for my content.
I used this code: h1 {color:#ffffff; font-size: 14px; font-family: Arial; font-weight: normal;} in my CSS, and it worked perfectly.. But when I add that to my frame page (Content), it my normal font is still black.. http://www.animeng.vzz.net/layout1.html
Any ideas? Thanks!
Khalid Ali
07-16-2003, 05:58 PM
Make sure css code is in the page that is nbeing loaded in the frame
spufi
07-16-2003, 06:31 PM
Originally posted by Wasiu0607
I have a problem with my font color. Note that I use Frames for my content.
I used this code: h1 {color:#ffffff; font-size: 14px; font-family: Arial; font-weight: normal;} in my CSS, and it worked perfectly.. But when I add that to my frame page (Content), it my normal font is still black.. http://www.animeng.vzz.net/layout1.html
Any ideas? Thanks!
That defines the properties of a <h1> tag which you have none in your page and iframe. If you want other text to be white, then you need to define it as so.
Wasiu0607
07-16-2003, 11:22 PM
Thanks for telling me that Spurfi. You helped me in every single Thread I posted.. Give ya A+++++++++++++:D
Wasiu0607
07-17-2003, 01:14 PM
Dang I have problems everyday. Here's another one.. I have a shoutbox in my website. But the font color for the shoutbox is black, even though I set it to white. The shoutbox is on the right side of the contents. http://www.animeng.vzz.net/layout1.html
I would appreciate it if you can tell me what's wrong. Thanks
DaveSW
07-17-2003, 01:23 PM
Try
<!--- Right Navigation ---->
<div style="position:absolute; left:656; top:35; width:150; color:white;">
<iframe src="http://animeng.vzz.net/shoutbox/shoutbox.php" name="shoutbox" width="144" height="440" frameborder="0"></iframe>
<!--- Right Navigation End ---->
Wasiu0607
07-18-2003, 12:44 AM
Nope.. Dont work :/
spufi
07-18-2003, 09:53 AM
You have to define the CSS on the shoutout.php page itself.
DaveSW
07-18-2003, 09:55 AM
lol - I didn't even notice the iframe!!
Wasiu0607
07-19-2003, 03:12 PM
I did.. But since the shoutbox script is in PHP, I dont know where to put the <h1></h1> tag .. :/ Heres the full php script..
<style>
BODY {
SCROLLBAR-FACE-COLOR: #294A63;
SCROLLBAR-HIGHLIGHT-COLOR: #294A63;
SCROLLBAR-SHADOW-COLOR:#294A63;
SCROLLBAR-3DLIGHT-COLOR:#294A63;
SCROLLBAR-ARROW-COLOR: #FFFFFF;
SCROLLBAR-TRACK-COLOR:#294A63;
SCROLLBAR-DARKSHADOW-COLOR: #294A63;
}
BODY,TD {
font-family: Arial;
font-size: 13px
}
TD.menu {
font-weight: normal;
h1 {color:#ffffff; font-size: 14px; font-family: Arial; font-weight: normal;}
color: #ffffff;
font-size: 13px
}
INPUT,TEXTAREA {
font-family: arial;
font-size: 13px;
border: 1px #ffffff solid
}
.box3d {
background-color: #294A63;
border-color: #294A63;
border-style: solid;
border-top-width: 1px;
border-right-width: 1px;
border-bottom-width: 1px;
border-left-width: 1px
}
</style>
<title>Anime nG Shoutbox</title>
<body leftmargin="1" topmargin="1" rightmargin="1" bottommargin="1" link="ffffff" vlink="ffffff" bgcolor="#294A63">
<h1>
<script language='javascript'>
function pop_up(url,width,height,size,scroll) {
newWin = window.open(url, "pop", "width="+ width +",height="+ height +",toolbar=no,menubar=no,location=no,scrollbars="+ scroll +",resizable="+ size +"");
newWin.focus();
}
function resetform() {
document.addform.name.value = "";
document.addform.site.value = "";
document.addform.shout.value = "";
}
function checkform() {
if (document.addform.shout.value.length > 160) {
alert("You have used too many characters in your message!!")
return false;
} else if (document.addform.shout.value.length < 5) {
alert("Your message must have more at least 5 characters!!")
return false;
} else {
return true;
}
}
</script>
</h1>
DaveSW
07-19-2003, 03:47 PM
Originally posted by Wasiu0607
BODY,TD {
font-family: Arial;
font-size: 13px
color: #somecolor;
}
that should do it
or just add
h1 (color: #somecolor;}
Wasiu0607
07-19-2003, 04:59 PM
Nope.. dont work
spufi
07-19-2003, 05:11 PM
Please post all of your code that's used on your shoutbox.php page. From what you posted, you aren't using PHP, and there is nothing in between the <h1> opening and closing tags that would be written in the white text because you are just using alert messages. Right after your opening <body> tag, put this.
<h1>Text</h1>
Now if the word Text isn't white, let me know because based on what you posted, it should.
spufi
07-19-2003, 05:17 PM
Originally posted by Wasiu0607
TD.menu {
font-weight: normal;
h1 {color:#ffffff; font-size: 14px; font-family: Arial; font-weight: normal;}
color: #ffffff;
font-size: 13px
}
Ok, I see one problem. You defined your <h1> tag without closing the definition of your TD.menu. I'm guessing here, but I think it should be rewritten like this.
TD.menu {
font-weight: normal;
color: #ffffff;
font-size: 13px;
}
h1 {
color:#ffffff;
font-size: 14px;
font-family: Arial;
font-weight: normal;
}
Wasiu0607
07-20-2003, 12:33 PM
<style>
BODY {
SCROLLBAR-FACE-COLOR: #294A63;
SCROLLBAR-HIGHLIGHT-COLOR: #294A63;
SCROLLBAR-SHADOW-COLOR:#294A63;
SCROLLBAR-3DLIGHT-COLOR:#294A63;
SCROLLBAR-ARROW-COLOR: #FFFFFF;
SCROLLBAR-TRACK-COLOR:#294A63;
SCROLLBAR-DARKSHADOW-COLOR: #294A63;
}
BODY,TD {
font-family: Arial;
font-size: 13px
h1 {color: #ffffff;}
TD.menu {
font-weight: normal;
color: #ffffff;
font-size: 13px;
}
h1 {
color:#ffffff;
font-size: 14px;
font-family: Arial;
font-weight: normal;
}
INPUT,TEXTAREA {
font-family: arial;
font-size: 13px;
border: 1px #ffffff solid
}
.box3d {
background-color: #294A63;
border-color: #294A63;
border-style: solid;
border-top-width: 1px;
border-right-width: 1px;
border-bottom-width: 1px;
border-left-width: 1px
}
</style>
<title>Anime nG Shoutbox</title>
<body leftmargin="1" topmargin="1" rightmargin="1" bottommargin="1" link="ffffff" vlink="ffffff" bgcolor="#294A63">
<h1>
<script language='javascript'>
function pop_up(url,width,height,size,scroll) {
newWin = window.open(url, "pop", "width="+ width +",height="+ height +",toolbar=no,menubar=no,location=no,scrollbars="+ scroll +",resizable="+ size +"");
newWin.focus();
}
function resetform() {
document.addform.name.value = "";
document.addform.site.value = "";
document.addform.shout.value = "";
}
function checkform() {
if (document.addform.shout.value.length > 160) {
alert("You have used too many characters in your message!!")
return false;
} else if (document.addform.shout.value.length < 5) {
alert("Your message must have more at least 5 characters!!")
return false;
} else {
return true;
}
}
</script>
</h1>
Nope.. Still dont work :(
spufi
07-20-2003, 02:48 PM
Let's break this down really simple. A PHP page is a page that has PHP in it. Unless I'm missing something, you have no PHP on your page. Until you do, you could have given you're page a html extension. You also, again, have an error in your CSS, but I'll post a correct version shortly. You only use one <h1> and it doesn't contain any text to be display, and hence there is not white text. The only thing you have inside of your <h1> tag is JavaScript code which doesn't display any text per se. I say if you added a piece of code like <h1>Text</h1> and you didn't see "Text" in white on your page let me know. Seeing your listing, you don't have that code in there, so I can't tell just how you did put it in there to see what you did. I cleaned up some of your code and added a <h1> tag and some text inside of it, and it shows up correctly, so it had to be something you were doing on your side of things. Anyway, here's what I use to see white text appear on a page with using a <h1> tag.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/htm14/strict.dtd">
<html>
<head>
<title>Anime nG Shoutbox</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style>
a { color:#FFFFFF;
}
BODY {
margin:1px;
background-color:#294A63;
SCROLLBAR-FACE-COLOR: #294A63;
SCROLLBAR-HIGHLIGHT-COLOR: #294A63;
SCROLLBAR-SHADOW-COLOR:#294A63;
SCROLLBAR-3DLIGHT-COLOR:#294A63;
SCROLLBAR-ARROW-COLOR: #FFFFFF;
SCROLLBAR-TRACK-COLOR:#294A63;
SCROLLBAR-DARKSHADOW-COLOR: #294A63;
}
BODY,TD {
font-family: Arial;
font-size: 13px
}
TD.menu {
font-weight: normal;
color: #ffffff;
font-size: 13px;
}
h1 {
color:#ffffff;
font-size: 14px;
font-family: Arial;
font-weight: normal;
}
INPUT,TEXTAREA {
font-family: arial;
font-size: 13px;
border: 1px #ffffff solid
}
.box3d {
background-color: #294A63;
border-color: #294A63;
border-style: solid;
border-top-width: 1px;
border-right-width: 1px;
border-bottom-width: 1px;
border-left-width: 1px
}
-->
</style>
</head>
<body>
<script type="text/javascript">
function pop_up(url,width,height,size,scroll) {
newWin = window.open(url, "pop", "width="+ width +",height="+ height +",toolbar=no,menubar=no,location=no,scrollbars="+ scroll +",resizable="+ size +"");
newWin.focus();
}
function resetform() {
document.addform.name.value = "";
document.addform.site.value = "";
document.addform.shout.value = "";
}
function checkform() {
if (document.addform.shout.value.length > 160) {
alert("You have used too many characters in your message!!")
return false;
} else if (document.addform.shout.value.length < 5) {
alert("Your message must have more at least 5 characters!!")
return false;
} else {
return true;
}
}
</script>
<h1>Text</h1>
</body>
</html>
Wasiu0607
07-22-2003, 01:14 AM
..
Wasiu0607
07-22-2003, 01:35 AM
.
Wasiu0607
07-23-2003, 11:40 AM
.
spufi
07-24-2003, 03:37 PM
Ok, so you just went and posted two pages worth of code. How does that code relate to your problem?
Wasiu0607
07-25-2003, 12:13 PM
Sorry. Um I kinda wanna give up on the shoutbox problem, since I know nothing about PHP and cannot find the problem..
I got a problem now though. I used the <h1></h1> code and i put in my CSS, h1 {color:#000000; font-size: 12px; font-family: Arial; font-weight: normal;}
But when I did <h1></h1>, it skips one line.
http://www.animeng.vzz.net/layout1.html
THANKS ALOT
DaveSW
07-25-2003, 02:29 PM
h1 always adds a space around itself. try:
h1 {
color: #000000;
font-size: 12px;
font-family: Arial;
font-weight: normal;
margin: 0px;
padding: 0px;
}
Wasiu0607
07-25-2003, 04:22 PM
Thanks, that fixed my problem ^_^
Wasiu0607
07-27-2003, 12:40 AM
I got a font size problem for my shoutbox. I put 7px for my font size, and when I viewed it with Opera, it seemed like 7 px. But when I viewed it with Internet Explorer, its like 14px, when I made it to 10 px, it was no difference. Any idea?
Da Warriah
07-27-2003, 07:44 AM
check your text size: View > Text Size...ive noticed that sometimes IE makes the text larger for no apparent reason...;)
Wasiu0607
07-27-2003, 11:14 AM
It's at normal.. o.O
You should really use 'pt' sizes rather than 'px' with fonts. Im not sure what the rough equivalent to 7px is.
Wasiu0607
07-27-2003, 07:37 PM
K thanks, and another problem.. -_- .. It's getting pretty annoying now..
http://www.animeng.vzz.net/ragnarok.html
The page is in frames. The frame in the contents page has the EXACT same CSS code as the one in ragnarok.html, yet they act differently. :mad: Can anyone tell me whats wrong?
spufi
07-27-2003, 08:59 PM
If I have the pages correct the only thing I see defined via CSS is your scroll bar thing and your links. I didn'y have any scroll bar appear, but the links seem to work the same. Could you define how your pages act differently?
Wasiu0607
07-27-2003, 10:40 PM
I copied the CSS codes from Ragnarok.html page onto whatsragnarok.html, but the text there is larger, and doesn't even change.
Wasiu0607
07-30-2003, 07:28 PM
SO?