a tag style with css

Discussion in 'HTML' started by Michael Huhn, Nov 23, 2005.

  1. Michael Huhn

    Michael Huhn Guest

    Hello,

    I've got a small problem to define an a Tag via css.style sheet.
    In my html page I have a couple of href. These links are always visible in the status bar as soon as they get the mouse over event.
    I don't want that the user is able to see where the href is linked.
    I found the following source code to customize the status bar as soon as I get the mouse over event:

    <A HREF="page.html" onMouseOver="self.status='Message';
    return true" onMouseOut="self.status=";return true">text</A>

    I want to define this in my css file which I is included in each html file I have. But I can't find the css file syntax for this.
    Do I have to define this in the style hwere I defined the link, hover, visited ... ??

    for example style.css:
    a:link { color:#666666; font-size: 16px; }
    a:visited { color:#666666; font-size: 16px; }

    Thank u for your help.

    Michael
     
    Michael Huhn, Nov 23, 2005
    #1
    1. Advertising

  2. Michael Huhn

    Els Guest

    Michael Huhn wrote:

    > Hello,
    >
    > I've got a small problem to define an a Tag via css.style sheet.
    > In my html page I have a couple of href. These links are always visible in the status bar as soon as they get the mouse over event.
    > I don't want that the user is able to see where the href is linked.


    Why?
    I will always be able to see that.

    > I found the following source code to customize the status bar as
    > soon as I get the mouse over event:
    >
    > <A HREF="page.html" onMouseOver="self.status='Message'; return
    > true" onMouseOut="self.status=";return true">text</A>


    Bad idea. If I would have JavaScript enabled, and notice that I can't
    see where the link is going, I'll be paranoid, thinking you're trying
    to trick me into opening something weird :)

    > I want to define this in my css file which I is included in each
    > html file I have. But I can't find the css file syntax for this.


    You can't define JavaScript in a CSS file. CSS is for styling.

    --
    Els http://locusmeus.com/
    Sonhos vem. Sonhos vão. O resto é imperfeito.
    - Renato Russo -
    Now playing: David Bowie - Scary Monsters (And Super Creeps)
     
    Els, Nov 23, 2005
    #2
    1. Advertising

  3. On Wed, 23 Nov 2005 18:26:26 +0100, Michael Huhn <>
    wrote:

    > Hello,


    Firstly, please set your client to send plain text messages to usenet. Not
    html. They are too big for no reason at all.

    > I've got a small problem to define an a Tag via css.style sheet.


    Secondly, you can't define anything. You can just suggest the looks of an
    element.
    What you call 'an a Tag' is the anchor element, not a tag. The tag is what
    you use to mark some content up to be an anchor.

    > In my html page I have a couple of href.


    Thirdly, it is usualy best to provide an URL so we all get to see what you
    are talking about.

    > These links are always visible in the status bar as soon as they get the
    > mouse over event.
    > I don't want that the user is able to see where the href is linked.


    Why is that? What do you have to hide? Do you import someone elses pages
    into a frame on your page or something? Playing some music, while I don't
    want that? Trying to execute a small app, like installing an expensive
    dialer? Other ugly methods?
    There are a few unsafe things going on in the www. That means for example
    that I would not ever click on a link that doesn't show me where it takes
    me or what it does for me.

    > I found the following source code to customize the status bar as soon as
    > I get the mouse over event:
    >
    > <A HREF="page.html" onMouseOver="self.status='Message';
    > return true" onMouseOut="self.status=";return true">text</A>


    Oh, that's okay then. Do use that. Since I don't have any javascript
    running, it won't bother me a bit. And it has an error btw.

    > I want to define this in my css file which I is included in each html
    > file I have. But I can't find the css file syntax for this.
    > Do I have to define this in the style hwere I defined the link, hover,
    > visited ... ??
    >
    > for example style.css:
    > a:link { color:#666666; font-size: 16px; }


    Ah, anyone not see that coming? Don't use fixed font sizes. People with IE
    won't be able to (easily) change font size in their screen if they
    want/need to. Use something like 100% or 1em or other relative unit.

    > a:visited { color:#666666; font-size: 16px; }


    And the last mistake, don't make links and visited links look the same.
    People want to know if they've been there already.

    Then to the answer: yes, you have to set properties and their values for
    the link, for all it's 'forms':

    a
    a:link
    a:visited
    a:hover
    a:focus
    a:active

    --
    ,-- --<--@ -- PretLetters: 'woest wyf', met vele interesses: ----------.
    | weblog | http://home.wanadoo.nl/b.de.zoete/_private/weblog.html |
    | webontwerp | http://home.wanadoo.nl/b.de.zoete/html/webontwerp.html |
    |zweefvliegen | http://home.wanadoo.nl/b.de.zoete/html/vliegen.html |
    `-------------------------------------------------- --<--@ ------------'
     
    Barbara de Zoete, Nov 23, 2005
    #3
  4. Michael Huhn

    Greg N. Guest

    Michael Huhn wrote:

    > I don't want that the user is able to see where the href is linked.


    Uh-uh. Put on your asbestos suit and duck, man.

    --
    Gregor's Motorradreisen:
    http://hothaus.de/greg-tour/
     
    Greg N., Nov 23, 2005
    #4
  5. Michael Huhn

    Michael Huhn Guest

    I am absolteley with you.

    But the problem I have is that the webserver accept that the user is able to
    delete somthing from the link and they can see the file and directory
    structure of the fileserver.

    Example:

    www.test.html/html/index.html

    If they delete the index.html they can see the file structure of
    www.test.html/html And they can see a complete list of the files they are in
    the html folder:

    Index.html

    Test2.html

    Test.html

    Xxxxx

    I don't want this. That's the reason why I want to make the link invisible
    in the status bar.

    May be u have another useful reason for me.

    :)

    Michael

    "Els" <> schrieb im Newsbeitrag
    news:tgybj4xmew8o$...
    > Michael Huhn wrote:
    >
    > > Hello,
    > >
    > > I've got a small problem to define an a Tag via css.style sheet.
    > > In my html page I have a couple of href. These links are always visible

    in the status bar as soon as they get the mouse over event.
    > > I don't want that the user is able to see where the href is linked.

    >
    > Why?
    > I will always be able to see that.
    >
    > > I found the following source code to customize the status bar as
    > > soon as I get the mouse over event:
    > >
    > > <A HREF="page.html" onMouseOver="self.status='Message'; return
    > > true" onMouseOut="self.status=";return true">text</A>

    >
    > Bad idea. If I would have JavaScript enabled, and notice that I can't
    > see where the link is going, I'll be paranoid, thinking you're trying
    > to trick me into opening something weird :)
    >
    > > I want to define this in my css file which I is included in each
    > > html file I have. But I can't find the css file syntax for this.

    >
    > You can't define JavaScript in a CSS file. CSS is for styling.
    >
    > --
    > Els http://locusmeus.com/
    > Sonhos vem. Sonhos vão. O resto é imperfeito.
    > - Renato Russo -
    > Now playing: David Bowie - Scary Monsters (And Super Creeps)
     
    Michael Huhn, Nov 23, 2005
    #5
  6. On Wed, 23 Nov 2005 18:44:21 +0100, Greg N. <> wrote:

    > Michael Huhn wrote:
    >
    >> I don't want that the user is able to see where the href is linked.

    >
    > Uh-uh. Put on your asbestos suit and duck, man.
    >


    rofl

    --
    ,-- --<--@ -- PretLetters: 'woest wyf', met vele interesses: ----------.
    | weblog | http://home.wanadoo.nl/b.de.zoete/_private/weblog.html |
    | webontwerp | http://home.wanadoo.nl/b.de.zoete/html/webontwerp.html |
    |zweefvliegen | http://home.wanadoo.nl/b.de.zoete/html/vliegen.html |
    `-------------------------------------------------- --<--@ ------------'
     
    Barbara de Zoete, Nov 23, 2005
    #6
  7. [ Please quote properly and do not top-post ]

    On Wed, 23 Nov 2005 18:52:59 +0100, Michael Huhn <>
    wrote:

    > "Els" <> schrieb im Newsbeitrag
    > news:tgybj4xmew8o$...
    >
    >> Michael Huhn wrote:
    >>


    [ I want to be able to obscure the URL from the visitor with javascript ]

    >> Bad idea. If I would have JavaScript enabled, and notice that I can't
    >> see where the link is going, I'll be paranoid, thinking you're trying
    >> to trick me into opening something weird :)


    >> --
    >> Els http://locusmeus.com/


    [ Please delete the signature block by hand, if your news client doesn't
    do that for you. ]

    > I am absolteley with you.
    >
    > But the problem I have is that the webserver accept that the user is
    > able todelete somthing from the link and they can see the file and
    > directory
    > structure of the fileserver.


    So, set the server up correctly, so visitors can't do that anymore.

    >
    > Example:
    >
    > www.test.html/html/index.html
    >
    > If they delete the index.html they can see the file structure of
    > www.test.html/html And they can see a complete list of the files they
    > are in the html folder:


    They still can, you know. If they arrive on a page, they can simply snip
    part of the URL from the address bar. You want to hide the address bar too?

    I had this problem and I do not have access to set the server up properly
    (cheap host; free as a matter of fact). What I did was put an index.html
    in every 'directory' there is in my site. If a visitor types an URL to a
    directory without a filename this index.html will open. So no visitor gets
    to see my directories and files lists.


    --
    ,-- --<--@ -- PretLetters: 'woest wyf', met vele interesses: ----------.
    | weblog | http://home.wanadoo.nl/b.de.zoete/_private/weblog.html |
    | webontwerp | http://home.wanadoo.nl/b.de.zoete/html/webontwerp.html |
    |zweefvliegen | http://home.wanadoo.nl/b.de.zoete/html/vliegen.html |
    `-------------------------------------------------- --<--@ ------------'
     
    Barbara de Zoete, Nov 23, 2005
    #7
  8. On Wed, 23 Nov 2005, Michael Huhn blurted out atop a fullquote:

    > But the problem I have is that the webserver accept that the user is able to
    > delete somthing from the link and they can see the file and directory
    > structure of the fileserver.


    The problem you have, then, is that you're trying to solve the wrong
    problem.

    > www.test.html/html/index.html
    >
    > If they delete the index.html they can see the file structure of
    > www.test.html/html And they can see a complete list of the files they are in
    > the html folder:


    So fix the server configuration to avoid that happening.

    > I don't want this. That's the reason why I want to make the link invisible
    > in the status bar.


    No, it isn't. It's the reason that you erroneously *think* you want
    that. Even if you succeeded with that (which, fortuately, readers can
    defend themselves against, anyway), you would not have solved the real
    problem.
     
    Alan J. Flavell, Nov 23, 2005
    #8
  9. Michael Huhn

    Mark Parnell Guest

    In our last episode, "Greg N." <> pronounced to
    alt.html:

    > Uh-uh. Put on your asbestos suit and duck, man.


    Where do I get an asbestos duck?

    --
    Mark Parnell
    http://clarkecomputers.com.au
     
    Mark Parnell, Nov 23, 2005
    #9
  10. Michael Huhn

    dorayme Guest

    > From: "Barbara de Zoete" <>
    >
    > On Wed, 23 Nov 2005 18:26:26 +0100, Michael Huhn <>
    > wrote:
    >
    >> Hello,

    >
    > Firstly, please set your client to send plain text messages to usenet. Not
    > html. They are too big for no reason at all.



    It annoyed me for a different reason, it was too small and not in the font I
    normally see...

    --
    dorayme

    (Speaking, of course, from BdeZ's killfile)
     
    dorayme, Nov 23, 2005
    #10
  11. Michael Huhn wrote:
    > I am absolteley with you.
    >
    > But the problem I have is that the webserver accept that the user is able to
    > delete somthing from the link and they can see the file and directory
    > structure of the fileserver.

    They can? FTP with no password/user name??? What server?
    >
    > Example:
    >
    > www.test.html/html/index.html
    >
    > If they delete the index.html they can see the file structure of
    > www.test.html/html And they can see a complete list of the files they are in
    > the html folder:
    >
    > Index.html
    >
    > Test2.html
    >
    > Test.html
    >
    > Xxxxx


    Your server has indexes o, just need to turn them off. If you do not
    control the server, you may able to turn off Indexes for your site with
    an .htaccess file with

    Options -Indexes

    within the file and saved to your document root.

    > I don't want this. That's the reason why I want to make the link invisible
    > in the status bar.
    >
    > May be u have another useful reason for me.
    >
    > :)

    <snip>

    --
    Take care,

    Jonathan
    -------------------
    LITTLE WORKS STUDIO
    http://www.LittleWorksStudio.com
     
    Jonathan N. Little, Nov 23, 2005
    #11
  12. Michael Huhn

    Neredbojias Guest

    With neither quill nor qualm, Michael Huhn quothed:

    > I am absolteley with you.
    >
    > But the problem I have is that the webserver accept that the user is able to
    > delete somthing from the link and they can see the file and directory
    > structure of the fileserver.
    >
    > Example:
    >
    > www.test.html/html/index.html
    >
    > If they delete the index.html they can see the file structure of
    > www.test.html/html And they can see a complete list of the files they are in
    > the html folder:


    Even with index.html still in the folder? Hmmm.

    Anyway, as others suggested, Google for .htaccess and turn indices off.
    If you do the statusbar thing with javascript (which is unrelated to
    css, btw,) non-js-enabled browsers will still be able to read it,
    nevertheless.

    --
    Neredbojias
    Contrary to popular belief, it is believable.
     
    Neredbojias, Nov 24, 2005
    #12
  13. Michael Huhn

    Toby Inkster Guest

    Mark Parnell wrote:
    > "Greg N." <> pronounced to alt.html:
    >
    >> Uh-uh. Put on your asbestos suit and duck, man.

    >
    > Where do I get an asbestos duck?


    Where do I get an asbestos duckman?

    --
    Toby A Inkster BSc (Hons) ARCS
    Contact Me ~ http://tobyinkster.co.uk/contact
     
    Toby Inkster, Nov 24, 2005
    #13
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. jstack
    Replies:
    1
    Views:
    612
    Tor Iver Wilhelmsen
    Jul 4, 2003
  2. shruds
    Replies:
    1
    Views:
    834
    John C. Bollinger
    Jan 27, 2006
  3. Aaron Beall
    Replies:
    2
    Views:
    1,822
    Aaron Beall
    Sep 14, 2007
  4. Ken Varn
    Replies:
    0
    Views:
    473
    Ken Varn
    Apr 26, 2004
  5. Nik Coughlin
    Replies:
    2
    Views:
    178
    Nik Coughlin
    Jan 23, 2008
Loading...

Share This Page