在没有表格的情况下以表格样式显示段落
关于一些 CSS 的快速问题。我已经有了这个用表格编码的页面,现在我想将其转换为 CSS。该表包含人员列表的图片和联系信息,因此将其放在 2x2 的表中(有四个人)。现在有四个段落充满了我需要的信息,我只需要把它们按正确的顺序排列即可。目前它们都属于同一类,为它们添加 id 有帮助吗?
Quick question about some CSS. I've had this page that was coded with tables and I would now like to transition it to CSS. The table has pictures and contact info for a list of people, so it was put in a 2x2 table (there are four people). Now there are four paragraphs filled with the information that I need, I just need to lay them out in the correct order. Currently they are all of the same class, would it help to add ids to all of them?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
将它们添加到
容器中,并为
标签指定以下样式:
希望这会有所帮助。
Add them to a
<div class="container">
container, and give the<p>
-tags the following styles:Hope this helps.
不,如果他们有相同的班级就完全没问题。假设他们有类
myblock
。然后这段代码只会将其中两个块并排放置,每行两个。
No, it's perfectly alright if they have the same class. Let's say they have the class
myblock
.Then this code would just put two of those blocks next to each other, two per row.
试试这个...
编辑:正确的顺序是什么?您可以发布一些代码或布局示例吗?
Try this...
Edit: What is the correct order? Can you post some code or layout examples?