user1108948
user1108948

Reputation:

Add new lines to make links vertically alignment

ASP.NET MVC 2 Project.

I want the links to the view vertically aligned. Should I add br or \n something?

Thanks.

               <div class="links">
                    <%=Html.ActionLink("Home", "Index", "Home") %>
                    <%=Html.ActionLink("About", "About", "Home") %>
               </div>

For instance.

               <div class="links">
                    <br />
                    <br />
                    <%=Html.ActionLink("Home", "Index", "Home") %>
                    <br />
                    <br />
                    <%=Html.ActionLink("About", "About", "Home") %>
               </div>

Upvotes: 0

Views: 798

Answers (1)

Dismissile
Dismissile

Reputation: 33071

Using what you have right now you could apply some CSS:

div.links a {
    display: block;
}

This would put each link on its own line.

Upvotes: 1

Related Questions