Acknowledging that anchors (inline devices) should be within a container (other than div.outer), this example is exactly like the previous one except that it puts <div>s around the anchors. Same look and feel. (Sorry, I'm a little "slow" today.)
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<!--
http://www.sitepoint.com/forums/showthread.php?890828-How-To-Deal-With-Reference-Links
Started by Chris77, 2012.10.05 00:15
-->
<head>
<title>template</title>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
<meta http-equiv="content-language" content="en-us">
<style type="text/css">
body {
padding:0px;
margin:0px;
}
div.outer {
border:1px solid #0a0;
width:400px;
margin:0px auto;
}
p {
margin-top:1.25em;
margin-bottom:.25em;
}
.anchor {} /* style as desired, if needed */
</style>
</head>
<body>
<div class="outer">
<p>This is a sentence in a really short paragraph.</p>
<p>This is a sentence in a really short paragraph.</p>
<p>This is a sentence in a really short paragraph.</p>
<div class="anchor"><a href="#">click me</a></div>
<p>This is a sentence in a really short paragraph.</p>
<p>This is a sentence in a really short paragraph.</p>
<p>This is a sentence in a really short paragraph.</p>
<div class="anchor"><a href="#">click me</a></div>
<p>This is a sentence in a really short paragraph.</p>
<p>This is a sentence in a really short paragraph.</p>
<p>This is a sentence in a really short paragraph.</p>
<div class="anchor"><a href="#">click me</a></div>
</div>
</body>
</html>
Bookmarks