claire_t
06-06-2012, 03:34 PM
Now I am sure this is really simple and I have googled it and looked on here but still can't find the answer.
Simply I have some thumbnail images and I want the corresponding text to sit underneath.
Found some solutions but people seem to mostly suggest tables, which I obviously don't want to do. Other solution is below.
HTML
<div id="main">
<div id="top" class="top"><p>Here are some of the projects we have completed at Noiz Electronics.<br/>
To view project descriptions and images click on the links below.</p>
</div>
<div class="thumb"><a href="stockley.html"><img src="images/completed/stockley.jpg" height="150" width="150" alt="Stockley Acedemy" class="imgfloatleft"/></a></div>
<div class="imgtext">Stockley Academy</div>
</div>
CSS
#top {
position:relative;
width:900px;
height:auto;
padding:5px;
float:left;
margin:10px 40px auto 40px;
text-align:center;
}
#main {
position:relative;
width:900px;
height:auto;
padding:5px;
float:left;
margin:10px 40px auto 40px;
}
.top {
font-size:18px;
}
.thumb {
height:150px;
width:150px;
float:left;
}
.imgtext {
float:left;
position:relative;
}
But the text sits to the right of the image.
GAHHHH!!!
Thanks in advance for help.
C
Simply I have some thumbnail images and I want the corresponding text to sit underneath.
Found some solutions but people seem to mostly suggest tables, which I obviously don't want to do. Other solution is below.
HTML
<div id="main">
<div id="top" class="top"><p>Here are some of the projects we have completed at Noiz Electronics.<br/>
To view project descriptions and images click on the links below.</p>
</div>
<div class="thumb"><a href="stockley.html"><img src="images/completed/stockley.jpg" height="150" width="150" alt="Stockley Acedemy" class="imgfloatleft"/></a></div>
<div class="imgtext">Stockley Academy</div>
</div>
CSS
#top {
position:relative;
width:900px;
height:auto;
padding:5px;
float:left;
margin:10px 40px auto 40px;
text-align:center;
}
#main {
position:relative;
width:900px;
height:auto;
padding:5px;
float:left;
margin:10px 40px auto 40px;
}
.top {
font-size:18px;
}
.thumb {
height:150px;
width:150px;
float:left;
}
.imgtext {
float:left;
position:relative;
}
But the text sits to the right of the image.
GAHHHH!!!
Thanks in advance for help.
C