Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > a tag style with css

Reply
Thread Tools

a tag style with css

 
 
Michael Huhn
Guest
Posts: n/a
 
      11-23-2005
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
 
Reply With Quote
 
 
 
 
Els
Guest
Posts: n/a
 
      11-23-2005
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)
 
Reply With Quote
 
 
 
 
Barbara de Zoete
Guest
Posts: n/a
 
      11-23-2005
On Wed, 23 Nov 2005 18:26:26 +0100, Michael Huhn <(E-Mail Removed)>
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 |
`-------------------------------------------------- --<--@ ------------'
 
Reply With Quote
 
Greg N.
Guest
Posts: n/a
 
      11-23-2005
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/
 
Reply With Quote
 
Michael Huhn
Guest
Posts: n/a
 
      11-23-2005
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" <(E-Mail Removed)> schrieb im Newsbeitrag
news:tgybj4xmew8o$(E-Mail Removed)...
> 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 vo. O resto imperfeito.
> - Renato Russo -
> Now playing: David Bowie - Scary Monsters (And Super Creeps)



 
Reply With Quote
 
Barbara de Zoete
Guest
Posts: n/a
 
      11-23-2005
On Wed, 23 Nov 2005 18:44:21 +0100, Greg N. <(E-Mail Removed)> 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 |
`-------------------------------------------------- --<--@ ------------'
 
Reply With Quote
 
Barbara de Zoete
Guest
Posts: n/a
 
      11-23-2005
[ Please quote properly and do not top-post ]

On Wed, 23 Nov 2005 18:52:59 +0100, Michael Huhn <(E-Mail Removed)>
wrote:

> "Els" <(E-Mail Removed)> schrieb im Newsbeitrag
> news:tgybj4xmew8o$(E-Mail Removed)...
>
>> 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 |
`-------------------------------------------------- --<--@ ------------'
 
Reply With Quote
 
Alan J. Flavell
Guest
Posts: n/a
 
      11-23-2005

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.

 
Reply With Quote
 
Mark Parnell
Guest
Posts: n/a
 
      11-23-2005
In our last episode, "Greg N." <(E-Mail Removed)> 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
 
Reply With Quote
 
dorayme
Guest
Posts: n/a
 
      11-23-2005
> From: "Barbara de Zoete" <(E-Mail Removed)>
>
> On Wed, 23 Nov 2005 18:26:26 +0100, Michael Huhn <(E-Mail Removed)>
> 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)

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
IE - can get actual CSS style, not computed style? Nik Coughlin Javascript 2 01-23-2008 01:26 AM
Changing style of the numbers in a CSS <ol> without changing the style of the <li> Aaron Beall HTML 2 09-14-2007 08:07 PM
how do u invoke Tag b's Tag Handler from within Tag a's tag Handler? shruds Java 1 01-27-2006 03:00 AM
To vlan tag or not to tag? budyerr Cisco 1 07-08-2004 03:45 AM
Need help with Style conversion from Style object to Style key/value collection. Ken Varn ASP .Net Building Controls 0 04-26-2004 07:06 PM



Advertisments