PDA

View Full Version : Help me with CSS/HTML....


Jason_Michael
24th Oct 2007, 10:01 pm
All,

Being a beginner, im having problems with getting the images on my site to drop under the text links..... At the moment they're all in a line. But i want it ideally so that the links are on a separate line, above the relavent image. Take a look to see what ive done.....
http://www.watest.co.uk/jason/index.html

I did try the...

#classname {clear:both;} in CSS, but didnt know what to class in the HTML. Basically ive tried for ages and its probably so simple that someone can spell it out.

Could someone please tell me how to write it in HTML & CSS???

Thanks

Jason

David
25th Oct 2007, 02:33 pm
Jason, as I recall, you have a text link above each image. Essentially, you need to clear each link from the preceeding image each image from the preceeding link. So, your markup might be:


<div class="pageLinks">
<a href="foldername/filename.html">The text to display</a>
<img src="foldername/imagename.jpg" width="100" height="100" alt"description of image" />
</div>


and then:


.pageLinks a, .pageLinks img{
text-align:center;
clear:both;
}


Ah, OK so now you've changed it so you have a link list and you want to make the images display below the list. No need to change the markup. All you need to do is add the following style rule:


.homeimages{
clear:both;
}


I guess you may have got your classes and ids mixed up.

Jason_Michael
25th Oct 2007, 04:40 pm
Yeah i changed it before i wrote that, i copied your css for your website. That worked though, thank you