Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 7 of 7
  1. #1
    Senior Coder
    Join Date
    Nov 2010
    Posts
    1,486
    Thanks
    279
    Thanked 32 Times in 31 Posts

    css text decoration none

    Hi, i am using javascript popup window open for a help link but for some reason even if i use the text decoration none clause in css it still show the word HELP with an underline..
    im perplexted alittle ..

    did i do this right

    Code:
    .help a{
            text-decoration:  none;
    }
    
    .help{
             font-size: 19px;
             color: #134977;
             font-weight:bold;
             text-decoration:  none;
    }

  • #2
    Senior Coder DJCMBear's Avatar
    Join Date
    Mar 2010
    Location
    United Kindom
    Posts
    1,173
    Thanks
    14
    Thanked 136 Times in 136 Posts
    Are you adding this css to the window with javascript or are you calling a url into the pop-up window?
    Official BinPress hand picked coder.
    For anyone worried about SQL injection go have a look at my small yet powerful script here.
    Go Pledge for Light Table, if it hit's $300,000 Python and other languages will get added.
    I am 1 of 65,608 people to get a Pebble Watch :P

  • #3
    Senior Coder
    Join Date
    Nov 2010
    Posts
    1,486
    Thanks
    279
    Thanked 32 Times in 31 Posts
    im doing it like this

    Code:
    <a href="javascript: void(0);" onClick="javascript:popup = window.open('help.html','Help1','status=0,menubar=0,resizable=1,scrollbars=1,width=500,height=400');gethelpnow();"><h3><span class="help">Help</span></h3></a>

  • #4
    New Coder
    Join Date
    Dec 2010
    Posts
    33
    Thanks
    0
    Thanked 1 Time in 1 Post
    Use the javascript in header, removing a href tag and try.

  • #5
    Senior Coder coothead's Avatar
    Join Date
    Jan 2004
    Location
    chertsey, a small town 25 miles south west of london, england.
    Posts
    1,746
    Thanks
    0
    Thanked 244 Times in 239 Posts
    Hi there durangod,

    it is not permissible to place a block level element - "h3" within an inline element - "a".

    Also note that those with javascript disabled will not be able to view your help.html page.

    I would suggest that you code it something like this...
    Code:
    
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
       "http://www.w3.org/TR/html4/strict.dtd">
    <html lang="en">
    <head>
    
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <meta name="language" content="english"> 
    <meta http-equiv="Content-Style-Type" content="text/css">
    <meta http-equiv="Content-Script-Type" content="text/javascript">
    
    <title> pop-up link</title>
    
    <style type="text/css">
    #mylink  {
             font-size: 19px;
             color: #134977;
             font-weight:bold;
             text-decoration:  none;
     }
    </style>
    
    <script type="text/javascript">
    
    function init(){
    
       var popup;
       var features='status=0,menubar=0,resizable=1,scrollbars=1,width=500,height=400';
    
    document.getElementById('mylink').onclick=function() {
    if(popup) {
       popup.close();
     }
    
       gethelpnow();
    
       popup=window.open(this.href,'Help1',features);
       popup.focus();
       return false;
      }
     }
    
    function gethelpnow() {
       alert('this is the function\n\n gethelpnow()')
    }
    
     window.addEventListener?
     window.addEventListener('load',init,false):
     window.attachEvent('onload',init);
    
    </script>
    
    </head>
    <body>
    
    <div>
    <a id="mylink" href="help.html">Help</a>
    </div>
    
    </body>
    </html>
    
    coothead

  • Users who have thanked coothead for this post:

    durangod (12-24-2010)

  • #6
    Senior Coder
    Join Date
    Nov 2010
    Posts
    1,486
    Thanks
    279
    Thanked 32 Times in 31 Posts
    thanks coothead, by the way love the username. lmao peace have a great holiday.

  • #7
    Senior Coder coothead's Avatar
    Join Date
    Jan 2004
    Location
    chertsey, a small town 25 miles south west of london, england.
    Posts
    1,746
    Thanks
    0
    Thanked 244 Times in 239 Posts
    No problem, you're very welcome.
    The user name is a perfect description of my pate.


  •  

    Tags for this Thread

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •