问题描述
|
我正在此网站上工作。(http://kristinbecker.com/everydaypart1_test.htm)
客户希望在各种珠宝下有一些空间。我将如何在段落下面折断段落,但每次我创建新段落时都不让它返回一行。长度无关紧要,宽度已设置。我只是不希望线返回。我将如何在html或CSS中执行此操作?
页数:
http://kristinbecker.com/everydaypart1_test.htm
http://kristinbecker.com/style.css
(警告的Css可能不匹配,我从一位身患绝症的人那里接过这份工作。Css工作表中包含一些类,但有些仅嵌入各个页面的标题中。)
任何帮助都会很棒,谢谢!
解决方法
在稍微更改了HTML之后,这在CSS中非常简单。您当前的结构有点像这样:
paragraph containing images
first image
second image
third image
fourth image
paragraph about first image
paragraph about second image
paragraph about third image
paragraph about fourth image
您可以先将其更改为:
unordered list
list item
image
paragraph about image
list item
image
paragraph about image
list item
image
paragraph about image
list item
image
paragraph about image
现在,图像及其相应的段落已清晰链接。现在,如果无序列表具有类别images
:
.images {
margin: 0;
padding: 0;
overflow: auto;
}
.images li {
list-style-type: none;
margin: 0;
padding: 0;
width: 155px;
min-height: 500px; /* adjust this as you see fit */
float: left;
}
现在,您甚至不必按行将图像分开。 CSS将为您解决所有问题。
, “返回”是指您换行。
selector { whitespace: nowrap }
, 我快速浏览了您的页面。
将此添加到您的.underpics
班
display: inline-block;