我怎样才能带回边界的右侧?

时间:2018-10-31 00:21:27

标签: html css

我的“秋季服装”边框的右侧消失了,我想知道如何将其取回?

enter image description here

h3.outfitsbuttonsheadings {
	
	text-align: center;
	font-family:'Mali', cursive;

}

span.outfitsbuttonsheadings {
	text-align: center;
	padding-left: 4px;
	padding-right: 4px;
	border: 2px solid black; 
	
}

span.date {
	text-align: center;
	font-family: "Times New Roman";
	font-weight: normal;
	
}
<h3 class="outfitsbuttonsheadings">
			<span class="outfitsbuttonsheadings">Autumn outfits<br></span><span class="date">23 September, 2018</span>
		</h3>
		

2 个答案:

答案 0 :(得分:1)

边框由于标记无效而消失;您不能在<br />标签的内部中使用<span>标签,因为<span>标签only allows for表示内容。

只需将<br />标记移到之后,即可恢复边框:

<span>
h3.outfitsbuttonsheadings {
  text-align: center;
  font-family: 'Mali', cursive;
}

span.outfitsbuttonsheadings {
  text-align: center;
  padding-left: 4px;
  padding-right: 4px;
  border: 2px solid black;
}

span.date {
  text-align: center;
  font-family: "Times New Roman";
  font-weight: normal;
}

答案 1 :(得分:0)

在您的第一个跨度结束之前,您有一个br标签:

result.css('a::attr(data-id)').extract()
h3.outfitsbuttonsheadings {
  text-align: center;
  font-family: 'Mali', cursive;
}

span.outfitsbuttonsheadings {
  text-align: center;
  padding-left: 4px;
  padding-right: 4px;
  border: 2px solid black;
}

span.date {
  text-align: center;
  font-family: "Times New Roman";
  font-weight: normal;
}