Cenzic 232 Patent
Paid Advertising
sla.ckers.org is
ha.ckers sla.cking
Sla.ckers.org
For any nonsense or banter that doesn't fit anywhere else. LoL! omg! ROFL! 
Go to Topic: PreviousNext
Go to: Forum ListMessage ListNew TopicSearchLog In
CSS Covering Page
Posted by: kane_666
Date: December 19, 2006 07:24AM

Hey i wasn't sure were to post this, so i thought i'd post it here ;)

Basically im new to CSS but im getting the hang of it and finding it pretty easy.
On myspace i wanted to cover the page with a DIV then use a HREF to change the value of 'visibility' to hidden. This way the DIV will disappear and show my myspace. I was wondering if this is possible (the hyperlink changing css properties i mean)

This is just a little project i thought i'd try out...
any ideas?

Thanks.

Options: ReplyQuote
Re: CSS Covering Page
Posted by: Torstein
Date: December 19, 2006 11:30AM

Change the style attribute of the div with javascript. Should work :)

Options: ReplyQuote
Re: CSS Covering Page
Posted by: rsnake
Date: December 19, 2006 11:44AM

Do you mean something like:

<A HREF="whatever"><DIV STYLE="position:fixed;width=100%;height=100%;top:0;left:0;bottom:0;right:0;"> </DIV></A>

- RSnake
Gotta love it. http://ha.ckers.org

Options: ReplyQuote
Re: CSS Covering Page
Posted by: Torstein
Date: December 19, 2006 12:39PM

I thought he meant something like:

<A HREF="javascript: //change the style of splash to hidden">Welcome to my site</A><DIV ID="splash"STYLE="position:fixed;width=100%;height=100%;top:0;left:0;bottom:0;right:0;"> </DIV>

But after re-thinking, that would be hard to do in myspace. :)

Options: ReplyQuote
Re: CSS Covering Page
Posted by: rsnake
Date: December 19, 2006 01:33PM

Oh, I may have mis-read that. Sorry, the question wasn't clear.

- RSnake
Gotta love it. http://ha.ckers.org

Options: ReplyQuote
Re: CSS Covering Page
Posted by: kane_666
Date: December 21, 2006 02:53AM

Sorry if i didn't make the question clear, but what i wanted to do was:

Create a div with height and width equal to 100% so it covers the page (this i can do)
But then, i wanted to create a link that changes the div "visibility" attribute to hidden.

This way the DIV will disappear revealing the page behind it.
----
Some of you have said to use javascript, but myspace has patched the firefox "exploit" right? cant remember it exactly but it was something like onload..รถ (different character)

Thanks.

Options: ReplyQuote
Re: CSS Covering Page
Posted by: maluc
Date: December 21, 2006 04:29AM

yes, that's possible, but only with either javascript, or a data: link. data: isn't recognized by IE though, so it wouldn't work at all in IE.

to do it in javascript, just a:
<div id="Div_Id_Here" style="visibility:visible;position:absolute;top:0;left:0;width:100%;height:100%;background-color:red;z-index:9">
  <a href="javascript:x=document.getElementById('Div_Id_Here');x.style.visibility='hidden'">View My Site
  </a>
</div>

note: didn't test, but should work.. or something very similar

-maluc

Options: ReplyQuote
Re: CSS Covering Page
Posted by: rsnake
Date: December 21, 2006 10:19AM

You could change the style of a class of that div so that when clicked the CSS for a.visited changes to invisible or something. I'm not certain how CSS handles things like thispage.html#clicked if you are on that page (my guess is it will consider it already clicked) so that may not work. So you'd probably have to add an extra parameter like thispage.html?randomparam=1&otherparams=...

- RSnake
Gotta love it. http://ha.ckers.org

Options: ReplyQuote
Re: CSS Covering Page
Posted by: kane_666
Date: December 22, 2006 05:44AM

Thanks for the help.
I'll look into this and see if i can get it working ;)

Options: ReplyQuote


Sorry, only registered users may post in this forum.