So some reason I cannot get my border spacing to work. No matter what size I set it to nothing happens. I'm only using the border for a top line.
My CSS
p {
border-spacing: 5000px;
text-align: right;
color: silver;
font-size: 70%;
border-style: solid;
border-top: solid silver;
border-width: thin;
border-bottom: none;
border-right: none;
border-left: none;
}
MY HTML
<p>COPYRIGHT © ERNST EVERYTHING INC. ALL RIGHTS RESERVED</p>
So some reason I cannot get my border spacing to work. No matter what size I set it to nothing happens. I'm only using the border for a top line.
My CSS
p {
border-spacing: 5000px;
text-align: right;
color: silver;
font-size: 70%;
border-style: solid;
border-top: solid silver;
border-width: thin;
border-bottom: none;
border-right: none;
border-left: none;
}
MY HTML
<p>COPYRIGHT © ERNST EVERYTHING INC. ALL RIGHTS RESERVED</p>
Share
Improve this question
edited Nov 5, 2012 at 18:34
j08691
208k32 gold badges269 silver badges280 bronze badges
asked Nov 5, 2012 at 18:32
user1707694user1707694
131 silver badge5 bronze badges
0
4 Answers
Reset to default 4border-spacing
only applies to tables. Try using this for your CSS:
p {
text-align: right;
color: silver;
font-size: 70%;
border-top: thin solid silver;
padding-top: 5000px;
}
border-spacing is only available for tables, not paragraphs. use padding instead.
p {
text-align: right;
color: #C0C0C0;
font-size: 70%;
border-top: 1px solid #C0C0C0;
padding-top: 5000px;
}
border-spacing
is a property of tables, not block objects like you're using.
Because it's style for <table>
tag. Try this:
<style>
table {
border: 4px double #333;
border-collapse: separate;
width: 100%;
border-spacing: 7px 11px;
}
td {
padding: 5px;
border: 1px solid #a52a2a;
}
</style>
<table>
<tr>
<td>1</td><td>2</td>
</tr>
<tr>
<td>3</td><td>4</td>
</tr>
</table>
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745225664a4617449.html
评论列表(0条)