control formatting on url link

6 views
Skip to first unread message

Jshelley

unread,
Aug 25, 2012, 12:50:54 PM8/25/12
to mo...@googlegroups.com
Hi all,

I am a relative noob to mobl and have an issue that I believe has to do with css. I have created a new mobl project just to figure out this issue. I have a root page with one button which is a link to an external site. I am trying to figure out how to remove the underline that seems to be automatically applied to a url link. I have to be missing something and need some input from a fresh pair of eyes. Here is my  hello.mobl file.
.....
application hello

import mobl::ui::generic

screen root() {
header("hello")
nl()    
    link("www.test.com", target="_blank"){label("link button", style=linkbutton)}
}
style linkbutton{
  background-color: #fff;
  border: 1px solid #cccccc;
  border-left: 0;
  border-right: 0;
  color: #000;
  display: block;
  font-size: 17px;
  margin: 0.3em;
  margin-bottom: -1px;
  padding: 12px 10px;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  -moz-border-radius: 10px;
  -webkit-border-radius: 10px;
  border-radius: 10px;
  text-decoration: none;
  }
.....

I understand I can use the "mobl::ui::generic" for styling, but was taking this approach for quick testing. "text-decoration: none;" doesn't seem to do it. 

Can anyone give me a push in the right direction?

Thanks a lot!
Joe

Chris Melman

unread,
Sep 3, 2012, 6:55:18 AM9/3/12
to mo...@googlegroups.com

Hi Joe,
I have looked at it and the problem is that your style is applied on the label not on the link, that means the link is still giving you the underline. The current link implementation doesn't allow you to modify the link style. I guess there are 2 solutions, 1 is to change the link implementation so that you can give it a style. second solution is to use the openurl function.

greetings  chris

Date: Sat, 25 Aug 2012 09:50:54 -0700
From: shelle...@gmail.com
To: mo...@googlegroups.com
Subject: [mobl] control formatting on url link
Reply all
Reply to author
Forward
0 new messages