473,604 Members | 2,583 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

first-letter won't work in anchor

I am trying to get "first-letter" to work inline withing an anchor. Actually
I have not been able to get it to work within an <a> tag whether inline,
linked, or embedded. Using IE6 service pack 1.

<html>
<head>
<style type="text/css">
h5 {background-color: red; padding-left: 5px}
a {color: white; font-size: 20px; text-decoration: none}
</style>
</head>

<body>

<h5 style="first-letter{color:br own}">
<a href="const.htm ">Antiques</a></h5>

</body
</html>

TIA, ps****@nospam.e atel.net
<remove ".nospam" to email me>
Jul 20 '05 #1
1 6861
Patrick wrote:
I am trying to get "first-letter" to work inline withing an anchor. Actually
I have not been able to get it to work within an <a> tag whether inline,
linked, or embedded. Using IE6 service pack 1.
Firstly, it doesn't matter which IE you're using, getting it to work
correctly is difficult — of course, this is no exception.
<h5 style="first-letter{color:br own}">


:first-letter is a pseudo element, which requires a :, or :: for CSS3,
to precede it. There is no point to use the style attribute for this,
simply apply the style within the stylesheet in the header, or a linked
stylesheet. This CSS works for Mozilla 1.7 RC2, and Opera 7.5, but not
IE6 SP1. (Only tested on Windows XP, not Linux or Mac)

h5 a { display: block; }

h5 a:link:first-letter,
h5 a:visited:first-letter,
h5 a:hover:first-letter,
h5 a:focus:first-letter,
h5 a:active:first-letter { color: black; }

a:link { color: red; }
a:visited { color: orange; }
a:hover { color: yellow; }
a:focus { color: green; }
a:active { color: blue; }

And this code works for Mozilla, Opera and IE.

h5 a { display: block; }
h5 a:first-letter { color: black; }
a { color: red; }

However, if you extend it using the various link pseudo classes, it
fails miserably in IE, while working perfectly in Mozilla and Opera. IE
will colour the first letter with the color from the applicable a:link
or a:visited style rule, and color the rest in the default visited
(usually purple) or unvisited (usually blue) link colour.

h5 a { display: block; }
h5 a:first-letter { color: black; }
a:link { color: red; }
a:visited { color: green; }

I haven't done a complete test of every variation, so experement with
it and see what you can find that works best for you.

--
Lachlan Hunt
http://www.lachy.id.au/
la**********@la chy.id.au.updat e.virus.scanners

Remove .update.virus.s canners to email me,
NO SPAM and NO VIRUSES!!!
Jul 20 '05 #2

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

Similar topics

24
6730
by: Hung Jung Lu | last post by:
Hi, Does anybody know where this term comes from? "First-class object" means "something passable as an argument in a function call", but I fail to see the connection with "object class" or with "first-class airplane ticket". I just find the name a bit strange. Also, if there are first-class objects, what would the second-class objects or economy/tourist class objects be? :)
4
12989
by: KJ | last post by:
We use a third party software package for acctg that limits us on field size - as a result, we at times have to enter an item into the app multiple times in order to get all the information. I then created an Access DB that is linked to the information and have combined all data onto one record so that we can export to excel. The next step for me is to eliminate all the other instances of this particular item, leaving me with only the...
5
5242
by: tdmailbox | last post by:
I have a form with a child form. In the child form there is a list of names that can grow quite large. On the parent form I want to display the first name from the child form. I set up a test box that is populated with the code =subfrm_media_review_sec_party.Form!first_name & " " & subfrm_media_review_sec_party.Form!last_name It works except that when I flip through the names it populates the parent form with the name of what ever...
2
1751
by: captain_2010 | last post by:
hi, >From below table want only the first value of each item id. and how to get it, tried to use top n function in select statement it takes only the first record. itemid qty 1 10 1 5 1 15
27
3125
by: hokiegal99 | last post by:
Hi Guys, This is my first C program. I started programming in Python. Please look over this source and let me know if I'm doing anything wrong. I want to start out right with C, so if you see anything wrong tell me now while I am learning! Thanks !!! > #include <stdio.h>
8
1950
by: Robert Gravereaux | last post by:
I've noticed that the first exception thrown/caught by an app running in debug is very slow - it takes perhaps 7 or 8 seconds on my P4 machine. I've noticed this on several different machines running the development environment. To replicate, create a new c# windows app, add a button, and hook it to the following code: private void btnException_Click(object sender, System.EventArgs e) { try
11
2355
by: Jason | last post by:
Hi I have a "problem" i have got a ASP.NET application. in this application i have included logging. in the logging i have logged how many seconds it takes for this application to fully load. i have placed these timing loggings in the Load and Init events on a typical aspx page. i.e. first line of code in Page_Load is DateTime dtStart = DateTime.Now; and the last lines of code are
26
30914
by: Martin R | last post by:
Hi, How to find first not null value in column whitout chacking whole table (if there is a not null value then show me it and stop searching, the table is quite big)? thx, Martin *** Sent via Developersdex http://www.developersdex.com ***
6
4216
by: =?Utf-8?B?UGF1bA==?= | last post by:
HI I have a stored procedure that returns data with a date field in the form of a DateTime type. I need to place data in variables based on days of the week starting with the first thursday of the month. So the week would be week 1= (first thursday of the month through the next wed). So for example for July 07 the first thursday is july5th so the first week would be thursday july 5th , friday july 6th, sat july 7th, sun july 8th, mon...
4
2175
by: Milan Krejci | last post by:
int first=15,latest=15; QString typ=NULL; std::map<int,std::string>::iterator i; for(i = SeznamPracovniDoby.begin(); i != SeznamPracovniDoby.end(); i++) { if (typ==NULL) typ=i->second.c_str(); if (typ!=i->second.c_str()) { std::cout<<first<<"-"<<latest<<":"<<typ; first=i->first; } else { latest=i->first; typ=i->second.c_str(); } std::cout << i->first << " " << i->second << std::endl; }
0
7929
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8406
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...
0
8274
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
6737
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
5882
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
5441
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
3906
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
3954
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1522
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.