Hi,
We can help with specific questions on CSS but asking us to do someone's homework isn't really ethical and you would have been better off asking specific general questions without referring to the homework.
I can give you a start with your orange boxes and you would be better off putting the images in the background of the div and then set position:relative on the div to create a local stacking context so that you can absolutely place the orange section to the bottom of that div. You can't nest the p element inside an anchor (only in html5) and you don't need that extra element anyway.
You can reduce the code to this:
Code:
.tekst {
background:url(kamers.jpg) no-repeat 0 0;
width:200px;
height:180px;
float:left;
margin:20px;
position:relative;
}
.tekst a{
position:absolute;
bottom:10px;
right:10px;
padding:15px;
background-color:#F80;
color: white;
text-decoration: underline
}
.img1{background:url(kamers.jpg) no-repeat 0 0}
.img2{background:url(restaurant.jpg) no-repeat 0 0}
.img3{background:url(stadsplan.jpg) no-repeat 0 0}
.img4{background:url(reservaties.jpg) no-repeat 0 0}
Code:
<div id="images">
<div class="tekst img1"><a href="#">Onze kamers</a></div>
<div class="tekst img2"><a href="#">Het restaurant</a></div>
<div class="tekst img3"><a href="#">Stadsplan Gent</a></div>
<div class="tekst img4"><a href="#">Reservaties</a></div>
</div>
That should give you the required result. (There is also no need for the class="tekst" on each div as you can reach those by saying #images div{styles etc..} and save all those extra classes. I would probably have used a list structure instead of all the divs for that section as they are a list of things and then you could style them via ul#images li{styles etc..}.)
Bookmarks