Jump to content

Aligning text and images


pahiker

Recommended Posts

I am trying to create a horizontal list of images and text, but I'm not sure how to keep everything together without using tables. To explain this better, I have text I want to appear above the image (prefer to center it on the image, but not required), then I have another image that will appear next to the first and will also have text that I want above it.Here is the website page, maybe it will explain things better: website pageNote the "Murrysville-Export Rotary Club" and "Penneco Oil Company" are examples.Ideally, I would like about a 5px border between the two, and to have the text above the appropriate image.Thanks in advance,MikeUPDATE:Ok, I figured out how to get the images and text to align properly, but it seems to have created another issue. There is an enclosing border around all of the photos, it is controlled by a <DIV> that encloses everything. For some reason I have to specify the height of the DIV rather than it calculating the size on its' own. Is this because I have nested DIV's? Or is there another issue that I am not catching.

Link to comment
Share on other sites

There is a Border in the CSS for the div.transprayer.The need to set a height is likely due to floating the Image Div's inside the Relatively positioned Containing div. Not saying that either of them are 'bad', but there are several ways to do this layout which would not require the position Relative.Sample Demo Here http://www.jlhaslip.com/samples/gallery/thumbs/index.html

Link to comment
Share on other sites

There is a Border in the CSS for the div.transprayer.The need to set a height is likely due to floating the Image Div's inside the Relatively positioned Containing div. Not saying that either of them are 'bad', but there are several ways to do this layout which would not require the position Relative.Sample Demo Here http://www.jlhaslip.com/samples/gallery/thumbs/index.html
Yes, I have something similar to that in other places, but on this page the thumbnails vary in size (height and width), and require a lot of manipulation each time a new one is added (new ones are always added to the front of the list). The method I am using floats the images around as new ones are added to the front, and I don't specify the width of the page which lets the thumbnails float as the viewer's window size changes.I'm guessing I will just have to live with expanding the border frame as I add new images. Well, at least that is easier than manipulating the lists.
Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...