BullGuard Antivirus Sale - 60% Off with openElement !
Forum Home Forum Home >

openElement

> openElement General Discussion
  New Posts New Posts RSS Feed - GoE act as link
  FAQ FAQ  Forum Search   Register Register  Login Login

GoE act as link

 Post Reply Post Reply
Author
Message
Gorksmash View Drop Down
Senior Member
Senior Member


Joined: Jan 09 2014
Location: Lansing, MI
Status: Offline
Points: 133
Post Options Post Options   Thanks (0) Thanks(0)   Quote Gorksmash Quote  Post ReplyReply Direct Link To This Post Topic: GoE act as link
    Posted: Feb 12 2014 at 6:56pm
What is the easiest way to make a group of elements behave like a link? I have a GoE that has special css:hover effects and I want it to act link the image link element when the user clicks on it.

would I just have to add a visible code block with a link and give it w:100% h100%?
Back to Top
Gorksmash View Drop Down
Senior Member
Senior Member


Joined: Jan 09 2014
Location: Lansing, MI
Status: Offline
Points: 133
Post Options Post Options   Thanks (1) Thanks(1)   Quote Gorksmash Quote  Post ReplyReply Direct Link To This Post Posted: Feb 12 2014 at 7:13pm
1) In the GoE create a link (single line text or something) and link it to the page you wish.
2) give the GoE a custom class (avail in v1.44)
3) Create a Code Block (Source) as Type: CSS   Position: Header
4) in the CSS block add this
.ClassName a
{
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  text-decoration: none; /* No underlines on the link */
  z-index: 10; /* Places the link above everything else in the div */
  background-color: #FFF; /* Fix to make div clickable in IE */
  opacity: 0; /* Fix to make div clickable in IE */
  filter: alpha(opacity=1); /* Fix to make div clickable in IE */
}
5) this will turn the text invisible so if you want text to display then you have to add in some text elsewhere. creating a link with only some text in a block of text works by only making the link part invisible.
Back to Top
Chris OE View Drop Down
Admin Group
Admin Group


Joined: Jan 22 2013
Location: New York
Status: Offline
Points: 186
Post Options Post Options   Thanks (0) Thanks(0)   Quote Chris OE Quote  Post ReplyReply Direct Link To This Post Posted: Feb 12 2014 at 8:50pm
Thanks for posting the solution to your own question! Sorry about the delay!

You could also try with a blank image (i.e. not selecting an actual image once you drag the element to the page) and changing the dimensions so it covers the right surface area. Images can be given a link in the properties tab. You might also be able to do that with a button link give that the dimensions you need. (Or is that why the IE workaround is needed?)


Back to Top
Gorksmash View Drop Down
Senior Member
Senior Member


Joined: Jan 09 2014
Location: Lansing, MI
Status: Offline
Points: 133
Post Options Post Options   Thanks (1) Thanks(1)   Quote Gorksmash Quote  Post ReplyReply Direct Link To This Post Posted: Feb 12 2014 at 8:52pm
the IE workaround needs a background so that the entire area is clickable (i believe) otherwise just the letters would be clickable... or not, lol
Back to Top
Gorksmash View Drop Down
Senior Member
Senior Member


Joined: Jan 09 2014
Location: Lansing, MI
Status: Offline
Points: 133
Post Options Post Options   Thanks (0) Thanks(0)   Quote Gorksmash Quote  Post ReplyReply Direct Link To This Post Posted: Mar 09 2014 at 3:38am
one tid-bit to add here, it is useful to have the link be it's own single line text element with 100% width and height at 0,0
or just just change it to:
.ClassName a
{
  position: absolute !important;
  width: 100% !important;
  height: 100% !important;
  top: 0 !important;
  left: 0 !important;
  text-decoration: none !important; /* No underlines on the link */
  z-index: 10 !important; /* Places the link above everything else in the div */
  background-color: #FFF !important; /* Fix to make div clickable in IE */
  opacity: 0 !important; /* Fix to make div clickable in IE */
  filter: alpha(opacity=1) !important; /* Fix to make div clickable in IE */
}

so that it overrides any rules in OElement.
Back to Top
Gorksmash View Drop Down
Senior Member
Senior Member


Joined: Jan 09 2014
Location: Lansing, MI
Status: Offline
Points: 133
Post Options Post Options   Thanks (0) Thanks(0)   Quote Gorksmash Quote  Post ReplyReply Direct Link To This Post Posted: May 07 2014 at 4:08am
I have modified this a bit so you do not need an extra single line text for the link... essentially you can just set the background's alpha to 0.

This enables you to have the text color, background... ect change when you hover
.Button a
{
  position: absolute !important;
  width: 100% !important;
  height: 100% !important;
  top: 0 !important;
  left: 0 !important;
  text-decoration: none !important; /* No underlines on the link */
  background: rgba(255, 255, 255, 0) !important;
  filter: alpha(opacity=1) !important; /* Fix to make div clickable in IE not sure you still need this with this new method*/
}

.Button:hover a
{
  position: absolute !important;
  width: 100% !important;
  height: 100% !important;
  top: 0 !important;
  left: 0 !important;
  text-decoration: none !important; /* No underlines on the link */
  /* Fallback for web browsers that doesn't support RGBa */
  background: rgb(255, 255, 255) !important;
  /* RGBa with 0.6 opacity */
  background: rgba(255, 255, 255, 0.4) !important; /*This makes the background semi-transparent*/
  color:white !important; /* This is the color of the text while you hover*/
}

one thing to note here is that if you are looking to help push your text to the middle of the GoE simply change its line height to the size of the GoE (works if you are really using this as a single-line text)
otherwise just hit enter and change the size of the empty line's font until you are happy with it.


Edited by Gorksmash - May 07 2014 at 4:13am
Back to Top
Gorksmash View Drop Down
Senior Member
Senior Member


Joined: Jan 09 2014
Location: Lansing, MI
Status: Offline
Points: 133
Post Options Post Options   Thanks (0) Thanks(0)   Quote Gorksmash Quote  Post ReplyReply Direct Link To This Post Posted: May 07 2014 at 4:22am
one more thing... in order to get a multiline text to be vertically centered you need to first set all text's size to something small like 10px, hit enter then highlight your text minus the return and change it to the size you want. otherwise the return (hitting enter) will be the same size as your text was.
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.047 seconds.