Hi all
I have a really simple layout but I think I’m making it too complicated.
It’s just an image with small block below that is a link.
The link contains text and an image.
I think my problem is adding the image.
The image will be part of a sprite so I want to add it as a background image.
In my example I have added a span with height and width and then set the background image on it, then position that span.
Is it possible to add the arrow background image to the gray block and position it on the right or do I need something like the span to add the background image to and then position that.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />
<style type="text/css">
*{
margin:0;
padding:0;
}
div{
border: 2px solid #000;
margin: 20px;
width:320px;
}
a{
background:#ddd;
display:block;
padding:10px;
position:relative;
}
span{
display:block;
width:60px;
height:30px;
position: absolute;
right:5px;
bottom:4px;
background:url('arrow.png') 0 0 no-repeat;
}
</style>
<title>Title of the document</title>
</head>
<body>
<div>
<img src="beach.jpg" alt="">
<a href="#">Link Text<span></span></a>
</div>
</body>
</html>