FORUMS: list search recent posts

Any help for CSS and iframes her?

COW Forums : Web Design

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Henry Cow
Any help for CSS and iframes her?
on Jan 15, 2006 at 10:18:04 pm

Hi,
Im pretty much clueless when it comes to CSS (and web design in general), so I hope you can help.

Im building a really simple site... some links on a page and an iframe on the same page which display the links content...

heres my css problem. I cannot get the 'active' state to work on my links to the iframe. My simple css says active is bold.... but I click on the link, the iframe shows the correct content, but the link state turns back to 'normal'.

Is it possible for css 'active' to work from page to iframe? or if it is possible how do i do it???

Any help or web pointers would be hugely appreciated...

Many thanks, Hen.

PS... google 'css iframe active' yeilds nothing useful to me!!


Return to posts index

Bret Williams
Re: Any help for CSS and iframes her?
on Jan 21, 2006 at 12:48:39 am

I don't know how to make it happen, but active just means "down" I think. It's the state while the mouse is held down. There isn't a state that specifies the active page. You have to use javascript for that. And while there is plenty of code bits for an active page, it's a little more specified for an iframe.

Good question. Curtis?


Return to posts index

Curtis Thompson
Re: Any help for CSS and iframes her?
on Jan 21, 2006 at 1:11:30 am

hello...

ya - active is that moment when you have the button pressed on the mouse. what you need to do is update the style of the link to bold text when they do a click so that it turns to bold once it's clicked...

make sense?

sitruc


Return to posts index


Henry Cow
AAAhhh... so...
on Jan 22, 2006 at 9:33:05 pm

Thanks for that. my non web head said that 'active' was something like...
if I have a ccs where 'active' changed the state if the page (say in an iframe) loaded was the same address as the link from the text...
obviously not.
So, IS there a way to have this happen... javascript? and if so, what solution should I be searching for, ie what is this function called by web designers...

thanks all in advance.
H


Return to posts index

Curtis Thompson
Re: AAAhhh... so...
on Jan 22, 2006 at 9:40:15 pm

hello...

not really just a single function. you have to update the style of the link itself...so something like this:

<A HREF="whatever.html" onClick="this.style.fontWeight='bold';">link</A>

or you could give it a css class and change that with the className (google that) so that you could do multiple styles at once...

make sense?

sitruc



Return to posts index

Bret Williams
Re: AAAhhh... so...
on Jan 24, 2006 at 6:20:40 am

That sounds like as you clicked on all the links, they'd all turn bold. Sounds to me like he wants the class determined by the actual page in the iframe. You helped me do something similar where the menu items pick their class by the directory the file is in. But it wouldn't work on an iframe I don't think.

It was some php code. How do we post code here?


Return to posts index


Curtis Thompson
Re: AAAhhh... so...
on Jan 24, 2006 at 3:45:43 pm

hmm - i guess i did miss the boat...doh!

you can just paste in plain text php or if you have it in brackets, replace the "<" char with "&lt;" and paste it...stick it in PRE tags to preserve formatting if you want to...

sitruc


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2017 CreativeCOW.net All Rights Reserved
[TOP]