/    Sign up×
Community /Pin to ProfileBookmark

Font Color Problem – Css?

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.. [url]http://www.animeng.vzz.net/layout1.html[/url]
Any ideas? Thanks!

to post a comment
HTML

30 Comments(s)

Copy linkTweet thisAlerts:
@Khalid_AliJul 16.2003 — Make sure css code is in the page that is nbeing loaded in the frame
Copy linkTweet thisAlerts:
@spufiJul 16.2003 — [i]Originally posted by Wasiu0607 [/i]

[B]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! [/B]
[/QUOTE]


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.
Copy linkTweet thisAlerts:
@Wasiu0607authorJul 17.2003 — Thanks for telling me that Spurfi. You helped me in every single Thread I posted.. Give ya A+++++++++++++?
Copy linkTweet thisAlerts:
@Wasiu0607authorJul 17.2003 — 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
Copy linkTweet thisAlerts:
@DaveSWJul 17.2003 — Try

<!--- Right Navigation ---->

<div style="position:absolute; left:656; top:35; width:150; [b]color:white;[/b]">

<iframe src="http://animeng.vzz.net/shoutbox/shoutbox.php" name="shoutbox" width="144" height="440" frameborder="0"></iframe>

<!--- Right Navigation End ---->
Copy linkTweet thisAlerts:
@Wasiu0607authorJul 18.2003 — Nope.. Dont work :/
Copy linkTweet thisAlerts:
@spufiJul 18.2003 — You have to define the CSS on the shoutout.php page itself.
Copy linkTweet thisAlerts:
@DaveSWJul 18.2003 — lol - I didn't even notice the iframe!!
Copy linkTweet thisAlerts:
@Wasiu0607authorJul 19.2003 — 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>
Copy linkTweet thisAlerts:
@DaveSWJul 19.2003 — [i]Originally posted by Wasiu0607 [/i]

[B]BODY,TD {

font-family: Arial;

font-size: 13px

color: #somecolor;

}

[/B]
[/QUOTE]


that should do it

or just add

h1 (color: #somecolor;}
Copy linkTweet thisAlerts:
@Wasiu0607authorJul 19.2003 — Nope.. dont work
Copy linkTweet thisAlerts:
@spufiJul 19.2003 — 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.
Copy linkTweet thisAlerts:
@spufiJul 19.2003 — [i]Originally posted by Wasiu0607 [/i]

[B]

TD.menu {

font-weight: normal;

h1 {color:#ffffff; font-size: 14px; font-family: Arial; font-weight: normal;}

color: #ffffff;

font-size: 13px

}[/B]
[/QUOTE]


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;

}
Copy linkTweet thisAlerts:
@Wasiu0607authorJul 20.2003 — <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 ?
Copy linkTweet thisAlerts:
@spufiJul 20.2003 — 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>
Copy linkTweet thisAlerts:
@spufiJul 24.2003 — Ok, so you just went and posted two pages worth of code. How does that code relate to your problem?
Copy linkTweet thisAlerts:
@Wasiu0607authorJul 25.2003 — 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
Copy linkTweet thisAlerts:
@DaveSWJul 25.2003 — h1 always adds a space around itself. try:

h1 {

color: #000000;

font-size: 12px;

font-family: Arial;

font-weight: normal;

margin: 0px;

padding: 0px;

}
Copy linkTweet thisAlerts:
@Wasiu0607authorJul 25.2003 — Thanks, that fixed my problem ^_^
Copy linkTweet thisAlerts:
@Wasiu0607authorJul 27.2003 — 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?
Copy linkTweet thisAlerts:
@Da_WarriahJul 27.2003 — check your text size: View > Text Size...ive noticed that sometimes IE makes the text larger for no apparent reason...?
Copy linkTweet thisAlerts:
@Wasiu0607authorJul 27.2003 — It's at normal.. o.O
Copy linkTweet thisAlerts:
@LizoJul 27.2003 — You should really use 'pt' sizes rather than 'px' with fonts. Im not sure what the rough equivalent to 7px is.
Copy linkTweet thisAlerts:
@Wasiu0607authorJul 28.2003 — 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?
Copy linkTweet thisAlerts:
@spufiJul 28.2003 — 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?
Copy linkTweet thisAlerts:
@Wasiu0607authorJul 28.2003 — I copied the CSS codes from Ragnarok.html page onto whatsragnarok.html, but the text there is larger, and doesn't even change.
×

Success!

Help @Wasiu0607 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.27,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...