First off, please bare with me as I am completely new to html/css so it is a miracle that I have gotten this far... I followed the tutorial here but had to make some modifications to get it to work. Instead of one image on the page I have 6 and, therefore, the only way I could get the objects to place was to create a sperate tag for each item due to the absolute format. I don't believe this is correct and would greatly appreciate any feedback one could give on how to clean up my css list as I am currently using - for this simple effect and I actually need to add more on a separate page.
If you make sure that the 'image' div has a position of relative then you'll be able to absolutely position the span with the class of 'caption' within it. It will then be applied to all of the captions, but only relative to the div that they're in.
@TheDoc: This is exactly what I was looking for. I am giving it a try right now and I truly appreciate your assistance. I knew from prior research that using h6+ was invalid but for some reason it worked when I tried it so I was forced to stick with it until someone smarter, like yourself, could point me in the right direction. Thanks again.
Ok, I've updated with the changes you mentioned but I guess I'm not positioning the photos properly. I've removed all of the extra photos until I can get the caption right on this first item. Here are the two css items
Done, but with errors. The absolute position is not allowing the caption to follow other photos. The updates are posted. Thanks for the continued help, I am literally at a loss.
Problem solved thanks to your amazing help! I did have to modify the final css a bit to fit my needs but the page looks great with what I feel is a much cleaner css and html list. My final page is here and below is my final css list. Thanks again to all who assisted, especially @TheDoc who continually provided support as I made more and more mistakes.
Ok, new issue with this same setup... I cannot, for the life of me, get this css to display properly on IE8 for Windows XP. This problem is confirmed with two seperate computers running the same version of IE8.
@mpd4128, you have 26 errors, some directly related to the content in question (basically missing closing span tags). The whole thing is bit overkill really. You don't need two spans where the caption is full width anyway (Chris added additional spans in the article to pad floating multi-line caption). You also don't need to class the remaining span - you can target it with descendant selectors ( .equipmentimage span { } ).
Further, you may not even need to class each div - you could enclose the whole image area in an element (I'd use a ul) with a single id and target everything you need with that one id.
It's only a problem with IE8 (Windows XP). I have opened the page in chrome for mac, safara for mac, IE9 for windows 7... all look perfect! I have found some reports of IE8 having format issues but the fix isn't working for me.
Again, life savers... it's amazing that 1 out of 3 browsers tested is THAT picky. Don't get me wrong, it was definately a fowl up on my part... but why in the world did the other two browsers get it right?!?!?
The page in question is here.
What you'll want to do is something like this:
If you make sure that the 'image' div has a position of relative then you'll be able to absolutely position the span with the class of 'caption' within it. It will then be applied to all of the captions, but only relative to the div that they're in.
position: absolute;
top: 12px;
left: 12px;
}
You'll need to fiddle a bit.
I would do this:
I don't really know why, but it's not liking your absolutely positioned caption.
you have 26 errors, some directly related to the content in question (basically missing closing span tags). The whole thing is bit overkill really. You don't need two spans where the caption is full width anyway (Chris added additional spans in the article to pad floating multi-line caption). You also don't need to class the remaining span - you can target it with descendant selectors ( .equipmentimage span { } ). Further, you may not even need to class each div - you could enclose the whole image area in an element (I'd use a ul) with a single id and target everything you need with that one id.