--- On Wed, 1/27/10, Stack Robert <[email protected]> wrote: > Also, I would like to have the captions below images set up > so that the title is flush left and bold, and the caption > (both are P elements) is flush right and on the same line as > the title. Any thoughts on how to get them on the same line?
Hi Rob, This might not be exactly what you want, but should at least give you a start: 1. Get the title and caption on the same line using 'opposing floats' (http://www.fiveminuteargument.com/opposing-floats): #title { float: left; } #caption { float: right; } 2. Reset horizontal margins so everything will fit: #title, #caption { margin-left: 0; margin-right: 0; } 3. Set widths to appropriate values so they both fit on the line, e.g. #title { width: 15%; } #caption { width: 85%; } 4. Sort out the vertical alignment: #caption { padding-top: 1em; /* to match title */ } 5. Finally, 'hack' their container so that it encloses these newly floated elements: .imageContainer { overflow: hidden; } That's all based on the image on the front page. Of course, you might want to tweak that according to more detailed requirements you may have, but that should be a good basis with which to start. - Bobby ______________________________________________________________________ css-discuss [[email protected]] http://www.css-discuss.org/mailman/listinfo/css-d List wiki/FAQ -- http://css-discuss.incutio.com/ List policies -- http://css-discuss.org/policies.html Supported by evolt.org -- http://www.evolt.org/help_support_evolt/
