473,397 Members | 1,961 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,397 software developers and data experts.

Clickable icon

I want to set up links to photos marked with camera icon.

I would like it if I could replace code like this:

<a href="images/roedy.jpg"><img src="images/camera.gif" width="29"
height="24" border="0" alt="photo"></a>

With code like this:

<span class="photo">"images/roedy.jpg"</span>
How close can I get, and what does the .photo style sheet entry look
like?
Bush crime family lost/embezzled $3 trillion from Pentagon.
Complicit Bush-friendly media keeps mum.
http://www.infowars.com/articles/us/...s_rumsfeld.htm
--
Canadian Mind Products, Roedy Green.
See http://mindprod.com/iraq.html photos of Bush's war crimes
Jul 21 '05 #1
8 3633
in comp.infosystems.www.authoring.stylesheets, Roedy Green wrote:
I want to set up links to photos marked with camera icon.

I would like it if I could replace code like this:

<a href="images/roedy.jpg"><img src="images/camera.gif" width="29"
height="24" border="0" alt="photo"></a>

With code like this:

<span class="photo">"images/roedy.jpg"</span>


Why? Not possible.
--
Lauri Raittila <http://www.iki.fi/lr> <http://www.iki.fi/zwak/fonts>
Utrecht, NL.
Support me, buy Opera:
https://secure.bmtmicro.com/opera/bu...tml?AID=882173
Jul 21 '05 #2
On Fri, 29 Apr 2005 01:07:24 +0200, Lauri Raittila
<la***@raittila.cjb.net> wrote or quoted :
<span class="photo">"images/roedy.jpg"</span>


Why? Not possible.


It would be easier to write and maintain. If not possible, can I do
something similar that is not quite that terse, where at least I don't
need the <img element for the camera.gif each time.
Bush crime family lost/embezzled $3 trillion from Pentagon.
Complicit Bush-friendly media keeps mum.
http://www.infowars.com/articles/us/...s_rumsfeld.htm
--
Canadian Mind Products, Roedy Green.
See http://mindprod.com/iraq.html photos of Bush's war crimes
Jul 21 '05 #3
Roedy Green wrote:
I would like it if I could replace code like this:

<a href="images/roedy.jpg"><img src="images/camera.gif" width="29"
height="24" border="0" alt="photo"></a>
With code like this:
<span class="photo">"images/roedy.jpg"</span>


Not possible with CSS, but pretty trivial in most tempting systems.

--
David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
Home is where the ~/.bashrc is
Jul 21 '05 #4
in comp.infosystems.www.authoring.stylesheets, Roedy Green wrote:
On Fri, 29 Apr 2005 01:07:24 +0200, Lauri Raittila
<la***@raittila.cjb.net> wrote or quoted :
<span class="photo">"images/roedy.jpg"</span>
Why? Not possible.


It would be easier to write and maintain.


Not good reason. Use preprosessing/makro in your editor.
If not possible, can I do something similar that is not quite
that terse, where at least I don't need the <img element for
the camera.gif each time.


Depends. If you need it in inline context, it is not exactly simple...
URL?

[please use standard sig separator "-- " (note space)]

--
Lauri Raittila <http://www.iki.fi/lr> <http://www.iki.fi/zwak/fonts>
Utrecht, NL.
Support me, buy Opera:
https://secure.bmtmicro.com/opera/bu...tml?AID=882173
Jul 21 '05 #5
On Fri, 29 Apr 2005 07:45:45 +0100, David Dorward <do*****@yahoo.com>
wrote or quoted :
Not possible with CSS, but pretty trivial in most tempting systems.


I wrote a macro to do it. It expands into the explicit image
reference.
Bush crime family lost/embezzled $3 trillion from Pentagon.
Complicit Bush-friendly media keeps mum.
http://www.infowars.com/articles/us/...s_rumsfeld.htm
--
Canadian Mind Products, Roedy Green.
See http://mindprod.com/iraq.html photos of Bush's war crimes
Jul 21 '05 #6
David Dorward <do*****@yahoo.com> writes:
Roedy Green wrote:
I would like it if I could replace code like this:

<a href="images/roedy.jpg"><img src="images/camera.gif" width="29"
height="24" border="0" alt="photo"></a>
With code like this:
<span class="photo">"images/roedy.jpg"</span>


Not possible with CSS, but pretty trivial in most tempting systems.


But you don't say which systems are most tempting ;-)

--
Jón Fairbairn Jo***********@cl.cam.ac.uk
Jul 21 '05 #7
Jón Fairbairn wrote:
David Dorward <do*****@yahoo.com> writes:
Not possible with CSS, but pretty trivial in most tempting systems.

But you don't say which systems are most tempting ;-)


Never post to Usenet before fully waking up. "Templating"

--
David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
Home is where the ~/.bashrc is
Jul 21 '05 #8
Roedy Green wrote:
I want to set up links to photos marked with camera icon.

I would like it if I could replace code like this:

<a href="images/roedy.jpg"><img src="images/camera.gif" width="29"
height="24" border="0" alt="photo"></a>

With code like this:

<span class="photo">"images/roedy.jpg"</span>
How close can I get, and what does the .photo style sheet entry look
like?

There is no way to make a link without an <a> tag.

You could get rid of the <img> tag (assuming that it is the same icon for
all tags), by setting it as the links background-image in CSS. In order to
keep accessability, there should be some content in the <a> tag, like
<a class="photo" href="images/roedy.jpg">show photo</a>.

If the <a> can be styles as a block element (depends on your layout), than
you can get rid of the text completely by using an image replacement
technique, e.g.
..photo {
display: block;
text-indent: -2000em; /* move text far out of visible area */
background-image: url(images/camera.gif);
width: 16px; height: 16px;
}

If the <a> must be inline, you can at least add the icon to the text
..photo {
padding-left: 20px; /* add some space at the left for icon */
background-image: url(images/camera.gif);
background-repeat: no-repeat;
}
(I don't know, if you could hide the text completely for inline elements...
would text-indent work, too??)

--
Benjamin Niemann
Email: pink at odahoda dot de
WWW: http://www.odahoda.de/
Jul 21 '05 #9

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

Similar topics

6
by: PhysicsGenius | last post by:
AAAAARRRRRRRRGGHGHGHGHGHGHGHGHGH!!!!!! I hate Macs. I have a wxPython program. It runs fine on OS X when I launch it from the Terminal ("pythonw appname.py") . The user wants to be able to...
53
by: Kerberos | last post by:
I followed Dan Cederholm's image replacement tutorial, to replace a header tag by a logo. The h1 is clickable if no CSS is applied but it I replace it by the logo, the area isn't clickable anymore...
9
by: Paul W | last post by:
I'm using a Table webcontrol to display a 'grid' to the user. Various cells should be 'clickable' by the user (to run javascript). How can I make this happen? (currently I use the background cell...
0
by: Showjumper | last post by:
I have seen the article on 4 guys that descibes creating an event calandar. However what i would like to do is have the days be clickable (i.e. click the day and it show the details for that event)...
0
by: Akbar | last post by:
Can anyone list the basic steps for creating a clickable custom icon on a Mappoint map? Currently I am to display custom icons on the map and have set: myPushPins.ReturnsHotArea = true; Now...
0
by: qwu2008 | last post by:
All, I wanted to create a browser helper object that has a clickable icon at the right corner of the browser (similar to the Google notebook icon at the right corner of the browser). When the user...
7
by: Jeff Gaines | last post by:
I have spent the day learning how to use Zend Development Environment. I can now produce a list of files in a directory, filtered by extension, and apparently clickable. Unfortunately clicking on...
3
by: crazychrisy54 | last post by:
Hi there I just wondered if there is any way using GD to insert a clickable button or some clickable text into a image? It is possible to create images for buttons but what if you want a...
3
by: hinting | last post by:
I am trying to make an icon that is similar to the star in gmail. When you click on it, it changes to yellow and if you click on it again, it changes back to transperant. So I have the first part...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
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...
0
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...
0
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...
0
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...

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.