Align Anchor?

Is it possible to align an Anchor element?

This is not working…

<div id="container">
	<a href="#">

#boxMemberProfile #container{
	display: block;
	width: 50%;
	margin: 0 auto;
	background: #ffc;

#container a{
	text-align: right;


Hi Debbie,

Anchors are inline elements and are therefore always aligned right :slight_smile: They are also always aligned left and center as well :slight_smile:

An inline element is only as wide as the content it contains so text-alignment doesn’t apply because there is no where to move it to.

If you set the anchor to display:block then it will fill the available horizontal space and then the text-alignment will work. Or alternatively apply the text-alignment to the block parent instead (#container)