HI,
If I understand correctly then for ie8+ you could do something like this:
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Untitled Document</title>
<style type="text/css">
p {
float:left;
overflow:hidden;
text-transform:uppercase;
margin:10px;
position:relative;
}
span {
float:left;
clear:left;
border:1px solid red;
border-bottom:none;
position:relative;
padding:5px;
}
span + span {
border:1px solid red;
border-top:none;
}
span:after, b.after {
content:" ";
display:block;
position:absolute;
left:100%;
bottom:0;
height:1px;
width:999em;
background:red;
}
span + span:after, span + span .after {
top:0;
bottom:auto;
}
/* ie7 fix */
span { zoom:expression( runtimeStyle.zoom=1, insertAdjacentHTML('beforeEnd', '<b class="after"></b>') );
}
/* if ie6 support is needed then drop the adjacent selector and add classnames to the span instead */
</style>
</head>
<body>
<p><span>Andrew </span><span>Robinson</span></p>
<p><span>Andrew with longer text </span><span>Robinson</span></p>
</body>
</html>
(I've added an expression fix for ie7 if support was required.)
Re this code:
Code:
<a href="../andyrobinson/index.html" class="dj-andyrobinson">
<p id="nametext"><span id="firstline">Andrew</span><br><span id="secondline">Robinson</span></p>
</a>
Unless you are using html5 then it is not valid to nest a p element inside an anchor and indeed even if you are using html5 it's still a risky thing to do because a lot of browsers can't handle it nicely. I've seen many bugs now because of this html feature. Most times there is no need anyway as you can make the anchor display block and put it inside the block element anyway.
Bookmarks