How to best style Button or style image with rollover and link

QuestionsHow to best style Button or style image with rollover and link
Mario asked 8 years ago

We created a Dashbutton for gambio and want to style it. A button or Text is possible. Also with CSS we worked, but this works not only in old phpgridversion, not the current, while pictures with link do not render. Are there any documentations how to use a dynamic css3 – image with link, or improve this for current version.

What works until now is:

———————-

$buttons_html = "<a target='_blank' href='mylink.php' style='
border-top: 1px solid #96d1f8;
background: #65a9d7;
background: -webkit-gradient(linear, left top, left bottom, from(#3e779d), to(#65a9d7));
background: -webkit-linear-gradient(top, #3e779d, #65a9d7);
background: -moz-linear-gradient(top, #3e779d, #65a9d7);
background: -ms-linear-gradient(top, #3e779d, #65a9d7);
background: -o-linear-gradient(top, #3e779d, #65a9d7);
padding: 3.5px 7px;
-webkit-border-radius: 17px;
-moz-border-radius: 17px;
border-radius: 17px;
-webkit-box-shadow: rgba(0,0,0,1) 0 1px 0;
-moz-box-shadow: rgba(0,0,0,1) 0 1px 0;
box-shadow: rgba(0,0,0,1) 0 1px 0;
text-shadow: rgba(0,0,0,.4) 0 1px 0;
color: white;
font-size: 14px;
font-family: Georgia, Serif;
text-decoration: none;
vertical-align: middle;
' class = 'myclass''>DashButton Gambio!</a>";
$col["default"] = $buttons_html;

—————————————
Thanks, Mario

7 Answers
selectcase.biz answered 8 years ago

until now I have this button, but I like to create one with css
http://bit.ly/2c3gcQp

Abu Ghufran answered 8 years ago

I am unable to understand what you mean by css.
The first code uses inline css, which seems ok.

Above link is not working.

Abu Ghufran answered 8 years ago

You can also define css class with hover.

$buttons_html = "<a target='_blank' href='mylink.php' class='myclass'>DashButton Gambio!</a>";
$col["default"] = $buttons_html;

<style>
a.myclass
{

}

a.myclass:hover
{

}
</style>

http://pastebin.com/WqCVFJJU
Line 139, 167

selectcase.biz answered 8 years ago

Thanks this works. I only cant remove the popping up of an alt-text nexto the button. On the button itsself while mouseover the no-alttext works. But the litle space nextto the button still shows the link. Is there a way to remove all alt-texts from a column with a link, but not global, only specificly?

——————–
$buttons_html = "<a alt='' title= '' target='_blank' href='mylink.php' class='myclass'>DashButton Gambio!</a>";
——————–

something like:
————————-
$col["linkoptions"] = "alttext:no"; // 🙂
————————-

selectcase.biz answered 8 years ago

the dashbutton is here:

http://bit.ly/2cfeHMe
use via https://proxy-nl.hide.me

Abu Ghufran answered 8 years ago

I am unable to use proxy due to some firewall settings here.
Can you email me code and screenshot at [email protected] as i am unable to see small space with link in my demo.

Your Answer

17 + 15 =

Login with your Social Id:

OR, enter

Attach code here and paste link in question.
Attach screenshot here and paste link in question.



How useful was this discussion?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate it.

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?