html - 我怎样才能恢复边界的右侧?

标签 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>
		

最佳答案

由于您的无效标记,边框消失了;你不能有 <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;
}
<h3 class="outfitsbuttonsheadings">
  <span class="outfitsbuttonsheadings">Autumn outfits</span>
  <br>
  <span class="date">23 September, 2018</span>
</h3>

关于html - 我怎样才能恢复边界的右侧?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53074623/

相关文章:

html - CSS 盒子布局

javascript - 将两列变成选项卡

html - Css 径向渐变,新语法

html - 在 td 或 tr 元素上创建一个透明的 div

html - 如何在选择下拉框中应用填充?

jquery - 如何使用 css 在 "range" slider 后面设置一个居中的标签

带有嵌入式 css 文件的 html 没有填满正文

javascript - 数据切换 ='tab' 或 ='pills' 不允许 url 工作

javascript - 无法从下拉列表中设置输入标签的值

html - 如何将我的复选框与 css 对齐?