...

View Full Version : Quick question about alignment



dazd
02-16-2012, 01:39 AM
Hey all,

I am currently trying to get paragraphs to display horizontally rather than vertically

This is my code



<div id="login-reg">
<p>Contact</p>
<p>Login / Register </p>
<p>Cart</p>
</div>


They display like this:

Contact
Login / Register
Cart

and I want them to display like this:

Contact Login / Register Cart

How do I do that?
I thought it would be



#login-reg {
display: inline;
}


I am wrong though :( what's new

dazd
02-16-2012, 01:41 AM
I don't have enough faith in myself :/
I forgot the p so now it works

lol this is what it's suppose to be

#login-reg p {
display: inline;
}

:thumbsup:
Thanks anyways lol

Arbitrator
02-16-2012, 07:41 AM
This is my code



<div id="login-reg">
<p>Contact</p>
<p>Login / Register </p>
<p>Cart</p>
</div>
Worth noting that the following structure makes more sense:


<ul id="login-reg">
<li>Contact</li>
<li>Login / Register</li>
<li>Cart</li>
</ul>

Or perhaps the following if you're using HTML5:


<nav id="login-reg">
<ul>
<li>Contact</li>
<li>Login / Register</li>
<li>Cart</li>
</ul>
</nav>



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum