- This topic is empty.
-
AuthorPosts
-
April 16, 2012 at 3:25 pm #37649peroyomasParticipant
I want to put an image floating at the left of a heading and its content beneath. The image is a thumbnail so I want people can access to the full version by clicking on it. Due to aesthetics, I prefer to put the image between the heading tag, because it don’t look nice after it and don’t make much sense before it. Does it hurt semantics doing that? If so, is there a workaround?
Heading
April 16, 2012 at 3:47 pm #101262TheDocMemberI would definitely keep it outside of the actual heading tag.
April 16, 2012 at 4:36 pm #101265peroyomasParticipantMy issue is that I want the image to be completely at the left of the whole section—short of if I use a table row with two cells , one for the image and the other for the rest of the content (like in this site), yet I suppose that’s better suited for CSS workarounds. If I put the image after the heading, the image floats after the heading and there is a little space at the left of the heading. I’m not sure how to solve that in a more or less clean way.
April 16, 2012 at 10:34 pm #101276TheDocMemberI don’t know why this can’t be accomplished without floats? Can you post an exactly screenshot of what you’re trying to do?
April 19, 2012 at 6:17 pm #101436peroyomasParticipantImage of what I wanted to do: http://i.imgur.com/LUODu.png I finally managed to do it with floats. There are a series of images which share the same width but not necessarily the same height so it may be a bit complicated with positioning. I noticed the videos section of this very site does something similar with definition lists, but that seems a bit awkward, so I tried something similar, but with HTML5 markup instead.
#content .thumblinks {
padding-left: 160px;
overflow: hidden;
}
#content .thumblinks img.alignleft{
margin-left: -160px;
float: left;
margin-right: 10px;
margin-bottom: 10px;
}
Title
Text
- List item
- List item 2
-
AuthorPosts
- The forum ‘Other’ is closed to new topics and replies.