473,801 Members | 2,379 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Links & Pictures

Hi there,

I'm Mikaël Hautin, a new one to this newsgroup. I will show you how to
get rid of <a> tags to put links on pictures.

When you want to put a link to another page on a picture, you type this
kind of HTML code :

<a href="page.html " style="text-decoration:none ;" alt="funny things
....">
<img src="img12.gif" alt="funny things ..." border="0">
</a>

But when you click on the image, you can see a dotted border around it.

If you type this instead :

<img src="img12.gif" alt="funny things ..." border="0"
onclick="this.l ocation='page.h tml';" style="cursor:h and;">

I think it is better, especially when you have frames in your website.

Voilà !

PS : forgive my english.

Jul 23 '05 #1
2 2360
Mikaël Hautin wrote:
Hi there,

I'm Mikaël Hautin, a new one to this newsgroup. I will show you how to
get rid of <a> tags to put links on pictures.

When you want to put a link to another page on a picture, you type this
kind of HTML code :

<a href="page.html " style="text-decoration:none ;" alt="funny things
...">
<img src="img12.gif" alt="funny things ..." border="0">
</a>

But when you click on the image, you can see a dotted border around it.

If you type this instead :

<img src="img12.gif" alt="funny things ..." border="0"
onclick="this.l ocation='page.h tml';" style="cursor:h and;">

I think it is better, especially when you have frames in your website.

Voilà !

PS : forgive my english.


Bad idea as it reduces the accesibility of the web page to people who
are not using pointing devices, have textual browsers, turned off
images, et cetera.

What's wrong with dotted borders? They show up even on textual links,
you know, and they do serve a purpose.

But if you really want to get rid of it:
<a href=my.uri onClick=this.bl ur() ><img ... /></a>

Jul 23 '05 #2
Mikaël Hautin wrote:
When you want to put a link to another page on a picture, you type this
kind of HTML code :

<a href="page.html " style="text-decoration:none ;" alt="funny things
...">
No I don't. For a start its almost always a really bad idea to remove
underlines from text links, secondly inline style is nasty and hard to
maintain, funally there is no alt attribute for the <a> element in any
version of HTML.
<img src="img12.gif" alt="funny things ..." border="0">
Again, no. I wouldn't use the border attribute, its presentational and its
task should be relegated to CSS. I would, on the other hand, specify the
width and the height so that browsers can produce a suitably sized
placeholder until they have the image downloaded.
But when you click on the image, you can see a dotted border around it.
The shock! The horror! The user agent tells the user that the image has
focus, thus giving them helpful visual feedback to let them know that they
have clicked on the image (as opposed to missing with the pointer or not
pressing the mouse button hard enough). Then, half a second later, it goes
away as the next page loads.
If you type this instead :

<img src="img12.gif" alt="funny things ..." border="0"
onclick="this.l ocation='page.h tml';" style="cursor:h and;">
Still missing the height and width, and still using inline style. "Hand"
isn't among the values that the cursor property takes in CSS, you probably
mean "pointer". Of course now, as the image isn't a link, you can't give it
the focus, so anybody using a non-pointing device (such as a keyboard)
won't be able to activate it.

.... and GoogleBot won't be able to follow it.

.... and it won't appear in a list of links with many browsers can generate
for their users on demand.

.... and it won't work if the user can't or won't use JavaScript.
I think it is better, especially when you have frames in your website.


http://www.allmyfaqs.com/faq.pl?Prob...h_using_frames

--
David Dorward <http://blog.dorward.me .uk/> <http://dorward.me.uk/>
Home is where the ~/.bashrc is
Jul 23 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

12
2635
by: Bunset | last post by:
i dont know what is more eficient, What do you think is better, put in pictures physically in records in database or put in links to pictures in records? Thank you.
0
2425
by: Thomas Scheffler | last post by:
Hi, I runned in trouble using XALAN for XSL-Transformation. The following snipplet show what I mean: <a href="http://blah.com/?test=test&amp;test2=test2">Test1&amp;</a> <a href="http://blah.com/?test=test&amp;amp;test2=test2">Test2&amp;amp;</a> This results in the following HTML Code:
0
259
by: Jason | last post by:
I have been trying to display pictures on my webpage on both imagebutton and image controls. I have tried adding the pictures at runtime (image1.imageURL = "pic.jpg") and setting the imageURL in the properties at desing time. When I look at the webpage on my computer, the picture displays just fine. When my clients look at the pictures it only shows part of the picture then stops and the page says done. With every refresh it shows a...
0
1039
by: Fenno | last post by:
I have an ASP.NET web application that contains some pictures that sometimes take several seconds to load. These pictures are contained in user controls on the page (if that makes any difference). The problem is that whilst the page is still loading, it is impossible to click on any of the links/buttons on the page. If you do click on a link/button, nothing happens. The site in question is http://www.shopandcrop.com.au However, once the...
0
1653
by: Roula | last post by:
Ok folks, we've recently added 1 click links to over 45 Oscar Sites, PLUS, we've now added Nominee Interviews,and Articles, and we're constantly adding to the mix! There are also industry blogs, as well as podcasts! Our tribute to the Oscar's is a special event, but our toolbar offers incredible links to the most amazing Entertainment sites online! Here's a full list of the Oscar Links (PLUS, more added daily!)...
1
2141
by: PengYu.UT | last post by:
There has been some lengthy discussion on pros and cons of Word and Latex on the web. But for drawing figure there are also two set of packages metapost and powerpoint(visio). I don't see much discuss on the advantages and disadvantages of them. Although I'm a fan of latex and metapost. I'm urged to switch from metapost to powerpoint for drawing pictures (mainly for acadamic papers) by somebody. Their claim is that pictures in...
2
2952
by: sebastian.janoschka | last post by:
Hi, I build my first Drag & Drop with JavaScript and I would like to drag the pictures when I click on it. When I create a normal div tag with some text the script works, but when I put a image in the div tag it works not correctly. Here is my Code... I integrated three pictures and one text, then you can see the differences.
1
3012
by: boclair | last post by:
I have been asked to assist some Veterans to overcome a problem they are having in IE6 with the behaviour of internal links on some pages they have written. Background Their schema is to float a thumbnail link to the right of a para (say), the para having the same id value as the name of full size image file that is to be downloaded. The image is got using a get variable in a query string which also links to the named id.
0
1513
by: eBob.com | last post by:
Here's how I insert and size pictures in an Excel spreadsheet which I create via a VB.NET program (commentary follows): 'add thumb nail objSheet.Rows(XLRow.ToString).rowheight = mpThumbNailHeight / 7 objSheet.Range("S" & XLRow.ToString).Select() objSheet.Pictures.insert(mpThumbNailLoc) 'size thumb nail - because they often end up different sizes although they all
0
10293
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10269
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10053
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9102
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7591
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5480
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5617
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3780
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2960
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.