You could simply use the "button" element. I'm not entirely sure what you're wanting to achieve, but you could give 10 buttons the same class.
HTML:
<button class="myButton" onClick="location.href='myPage.html'")>Log In</button>
<button class="myButton" onClick="location.href='anotherPage.html'")>Next Link</button>
CSS:
.myButton{
background-image:url("image.jpg");
}
.myButton:hover{
background-image:url("hover.jpg");
}
I could be completely off base on what you're trying to achieve, but that would work for what I think you're trying to achieve.
You could also not style the button at all and get a nice hover effect on its own, but it won't be the same in every browser.
You could also use regular anchor tags like what you have, give them a class that would work on all buttons:
<a class="myButton" href="myPage.html">Log In</a>
<a class="myButton" href="anotherPage.html">Link 2</a>
Oh, and if you don't want to do any of that, just keep your buttons that same as they are now, just duplicate your HTML, change where the anchor links to and the text, like so:
<body>
<ul>
<li>
<a href="#" class="my_button">
<div style="width:77px">
<div class="left"></div>
<div class="middle">Log In</div>
<div class="right"></div>
</div>
</a>
</li>
<li>
<a href="#1" class="my_button">
<div style="width:77px">
<div class="left"></div>
<div class="middle">Different link</div>
<div class="right"></div>
</div>
</a>
</li>
<li>
<a href="#2" class="my_button">
<div style="width:77px">
<div class="left"></div>
<div class="middle">Another link.</div>
<div class="right"></div>
</div>
</a>
</li>
</ul>
</body>
Adding PHP solution.
functions.php:
<?php
function myButton($link, $title){
echo '<a href="'.$link.'" class="my_button">
<div style="width:77px">
<div class="left"></div>
<div class="middle">'.$title.'</div>
<div class="right"></div>
</div>
</a>';
}
?>
Your new page would be page.php (not html)
page.php:
<?php
include_once 'functions.php';
?>
<body>
<ul>
<li>
<?php myButton('link.html', 'Click Me') ?>
</li>
<li>
<?php myButton('anotherlink.html', 'No, Click Me!') ?>
</li>
</ul>
</body>
This will allow you to cut down on code, while keeping your current structure. It will also allow you to type one line of code and will dynamically add your button.
Let me know if you want more info.