PDA

View Full Version : Dynamic Page Alterations using JavaScript/CSS


influxer
06-28-2005, 02:20 AM
Hey all,

I just finished a member section for my website that entails a user dynamically altering the look of the header portion of their page.

It is fairly simple. I have a preview of what the header looks like, and a few options above it to change (i.e: color, font, size, text, border, etc.)

Now, take a look at it: www.schoolrack.com/example/dynamic.php

How come in Firefox, everything looks as planned and works perfectly? The Title is above the Announcement and all the alterations change the Preview successfully.

Now, in Internet Explorer, the Title doesn't even show up on page load (until you highlight the area) and acts very funny when you change the text at all.

What is causing these problems in Internet Explorer...is there any way to fix this?

Thanks!
-influxer

harbingerOTV
06-28-2005, 03:05 AM
maybe:


.headersitetitletext{width:100%; color:#AAAAAA; font-family:'Verdana'; font-size:x-large; text-align:left; vertical-align:middle; overflow:hidden;}


is trowing it off. You don't need quotes on font names that only have 1 word in them eg:

helmet
arial
georgia

but you do on:

"trebuchet ms"
"news gothicmt"
"palantino linotype"

maybe but not sure. worth a shot at least.

deadimp
06-28-2005, 03:23 AM
I don't think it's that. I've gotten this to work on IE 6.0 (remember that it only has to parse with the semi-colon):
font-family: Century Gothic;
Actually, after playing with it some, I got a pretty frickin' wierd bug. If I change the text for the main title, it disappears. There are two ways for me to get it to reappear: Change the font's attributes (family, size, color), or simply highlite the text. However, if I highlite other text along with the main title, it disappears... Does this happen to anybody else?
Could it be some sort of wigged-out bug in IE?

NOTE: Your color picker doesn't work in Firefox... :(

EDIT: Wierd... I don't think IE is drawing a dirty rectangle (or however IE's graphics engine works) over the text, for when I move another window over the text, it is erased and not refreshed. Trying changing the attributes in the title text, compare and contrast with something that does work.
EDIT: Interesting...

influxer
06-28-2005, 03:27 AM
that didn't quite cut it...

I needed to add position:relative to fix it.

Thanks a lot!