I have a list as follows:
<ul id="menu">
<li><a href="#">Home</a></li>
<li><a href="#">Work</a>
<ul>
<li><a href="#">CSS Development</a></li>
<li><a href="#">Graphic Design</a></li>
<li><a href="#">Development Tools</a></li>
<li><a href="#">Web Design</a></li>
</ul>
</li>
<li><a href="#">About</a></li>
<li><a href="#">Contact Us</a></li>
<li><a href="#">Feedback</a></li>
</ul>
I am attaching an image of so far what I have done.
In this menu, I want to align feedback to the right side. How can I do it?
To make a right-aligned version of the list, only three changes need to occur. First, set the "UL" "text-align" to "right". Second, change the left "background-position" from "0" to "100%" - which makes the image align up with the right edge. And finally change "padding-left" to "padding-right".
Position The List Item Markers. The list-style-position property specifies the position of the list-item markers (bullet points). "list-style-position: outside;" means that the bullet points will be outside the list item. The start of each line of a list item will be aligned vertically.
First, wrap the form inside a wrapper div. Then, set the display property on the form to inline-block , which makes it react to the text-align: center property on the parent . wrapper element. Finally, set the text-align property on the form to left so that child inline and inline-block elements don't get centered.
Add this to your CSS content.
li:last-child
will select the last li
of the menu list.
Demo
#menu > li:last-child
{
float:right;
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With