Hospedaje - Rolex - Lingerie - Balance Transfer Credit Cards - Investing

PDA

View Full Version : <left> and <right> in "same row"?


abcdefGARY
Oct 23rd 2006, 7:00 pm
hello, I have some trouble figuring out how to do this...

for example, I want navigation for "next" and "prev" buttons.

I want to make like a single table row or single line that shows the label Prev on the left sight and Next on the right but without using tables

I tried this using <div> so I did:

<div align="left">Prev</div><div align="right">Next</div> but they appeared as two separate lines, instead of just one line.

is there any way to do this without using a table?

if anyone could help me, I'd be gladly to give them some green. thanks.

Zedzero
Oct 23rd 2006, 7:11 pm
use two nested divs.
like:


<div style="text-align:right;"> <div style="float:left;">Prev</div>Next</div>

missdanni
Oct 23rd 2006, 7:18 pm
Hrmm....

I have always used tables to serve for this type of thing.

The only other way I can think of off the top of my head would be pretty messy.

It would look like this:

<p align="center"><a href="#">&lt;&lt; Previous</a> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#">Next &gt;&gt;</a> </p>

Not so nice huh?

If I think of anything else though I will post and let you know. :)

missdanni
Oct 23rd 2006, 7:19 pm
use two nested divs.
like:


<div style="text-align:right;"> <div style="float:left;">Prev</div>Next</div>


:o Doh!! :o

abcdefGARY
Oct 23rd 2006, 7:23 pm
thanks. I used the float attribute by zedzero.

kk5st
Oct 23rd 2006, 8:58 pm
#nextlast {
text-align: right;
margin: 0 1em;
}

#last {
float: left;
}
===========
<p id="nextlast">
<a id="last" href="lastpage.html">Previous Page</a>
<a href="nextpage.html">Next Page</a>
</p>
Though it should probably be an unordered list, since it is a menu of sorts. Like so:
#nextlast { /*the ul*/
list-style: none;
padding: 0;
text-align: right;
margin: 0 1em;
}

#last {
float: left;
}
==========
<ul id="nextlast">
<li id="last"><a href="lastpage.html">Previous Page</a></li>
<li><a href="nextpage.html">Next Page</a></li>
</ul>
cheers,

gary