开发者

How to style a comment section in ul/li

How would I go about adding a comment section under each photo in this gallery? (You can view an image of what I'm hoping to do here: - won't let me post a link because i'm a new member.... zhttp://www.some-things.net/storage/Picture109.p ng )

I know the iframe may not be the best way to be working this - but my friend wanted a sideways scroll area with wordpress integration and I couldn't find any suitable gallery plugins.

The images are displayed in a ul/ li - but because it's display-inline it won't let me put in another div below each image.

http://www.some-things.net/storage/anna/wordpress/?page_id=49

Basically I want to create a section under each picture that contains room for co开发者_如何学JAVAmment if needed - something like the picture above.

Any tips on the code needed would be great!


Put the image and the content in a div, and float all these divs to the left. use inline-block as display and whitespace: no-wrap.

<html>
<head>
<style type="text/css">
#container {
    white-space: nowrap;
}
.image {
    display: inline-block;
    width: 150px;
}
.comment {
    display: block;
    white-space: normal;
}
</style>
<div id="container"><p>
  <div class="image">
    <div style="height: 200px; width: 150px; background: gold;"></div>
    <div class="comment">Bla bla bla lorum ipsum doler amet amor etc. etc.</div>
  </div>
  <div class="image">
    <div style="height: 200px; width: 150px; background: gold;"></div>
    <div class="comment">Bla bla bla lorum ipsum doler amet amor etc. etc.</div>
  </div>
  ...
  ...
</p></div>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜