sonictherapy Posted February 25, 2012 Share Posted February 25, 2012 Hello! I figured out how to put captions on images in HTML, but I cannot get the captions to float right or left with the images when I add the style tag. When the image goes to the right, the caption ends up right in the middle of all the text. I was told it is not as easy as it sounds, and that is right...Can someone help me with a good example, utilizing an image code and showing me just how to insert the proper tag? Link to comment Share on other sites More sharing options...
Ingolme Posted February 25, 2012 Share Posted February 25, 2012 I'd put the image and the caption text inside one same container and then float them. Link to comment Share on other sites More sharing options...
sonictherapy Posted February 25, 2012 Author Share Posted February 25, 2012 Would you be so kind as to explain to me how to do that? I am a newbie. Below is the image code with the caption beneath it. What would I insert, and where, to make it all go right? If I get rid of the "target=blank" and put in a style tag, the image goes right but not the caption.... <div class="image"><a href="http://s1104.photobucket.com/albums/h335/vickywillis/aop/?action=view¤t=402456_309700012410779_134529359927846_838745_1058749581_n.jpg" target="_blank"><img src="http://i1104.photobucket.com/albums/h335/vickywillis/aop/402456_309700012410779_134529359927846_838745_1058749581_n.jpg" border="0" alt="Photobucket"></a><div>concert poster</div></div> Link to comment Share on other sites More sharing options...
Ingolme Posted February 25, 2012 Share Posted February 25, 2012 The target attribute has no effect on presentation. Just float the container div to the right and both the image and caption should go to the right as well. Link to comment Share on other sites More sharing options...
boen_robot Posted February 25, 2012 Share Posted February 25, 2012 To clarify: <div class="image"> is your container element. That is the element you need to float. Make sure to float only the containers, not the content itself. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.