0

How do I right-align a border in this code?

This is the CSS code I have:

p {
  text-align: right;
  color: #757575;
  Background-color: #FFFFFF;
  font-size: 2.4em;
  width: 50px;
}
<p>Home<br>
  <a href="aboutus.html">About</a><br>
  <a href="gallery.html">gallery</a><br>
  <a href="shop.html">club shop</a><br>
  <a href="theteam.html">The Team</a><br>
  <a href="theteam.html">The Team</a><br>
  <a href="mappractice.html">location</a><br>
  <a href="contactus.html">contact us</a><br>
</p>

2
  • 1
    What do you mean right-align a border? Do you just mean how do you add a border on the right? If so, you need something like border-right: 1px solid #000; Commented Feb 4, 2018 at 20:00
  • There is no border in your CSS and "aligning a border" is meaningless. What are you actually trying to do? Commented Feb 4, 2018 at 20:00

1 Answer 1

1

You can use any of any of the following css class to direct your border in any direction. Hope that is what you are trying to achieve.

.border-right{ border-right: 1px solid black;}

.border-top{ border-top: 1px solid black;}

.border-left{ border-left: 1px solid black;}

.border-bottom{ border-bottom: 1px solid black;}

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.