3 replies [Last post]
F*SH
Offline
Regular
Last seen: 13 years 24 weeks ago
Joined: 2004-02-22
Posts: 36
Points: 0

Hello

I'm new to CSS layouts and positioning, but since I'm redecorating my site I may as well use it, being the future and all that.

I have myself a nice div box. In here, I want two bits of text, at either ends, vertically centralized:

**********************************************
*-----------------------------------------------------------------------*
*--Some Text---------------------------------Some more Text--*
*-----------------------------------------------------------------------*
**********************************************

(Ignore dashes)

So far the way I've done this (to get the vertical centralisation) is to put each text in a span box. But I can't seem to make the second span stick to the right. Wihout spans, I can't make the text not stick to the top.

Any ideas?

RWagz
Offline
newbie
Last seen: 16 years 45 weeks ago
Timezone: GMT-6
Joined: 2004-01-28
Posts: 4
Points: 0

Span positioning

it would help a lot to see the actual code you are using.

For my own purposes, I create a new box and float it to the right of the base underlying box, works great for me.

Take a look at http://s94474990.onlinehome.us/memberspage.html

The "titles" of the people listed are in a box all their own. I simply alter the centering of the "title" box to place it where I want it, and it will stay there even if the browser window is resized.

F*SH
Offline
Regular
Last seen: 13 years 24 weeks ago
Joined: 2004-02-22
Posts: 36
Points: 0

Span positioning

Eck, I could never quite understood float positioning; I'll have to look into it..

The code I'm using now is

CSS

#topbar	{
			background-color:  #6386de;
			margin: 0px;
			padding: 0px;
			height: 25px;
			}

Markup

<div id="topbar">
	<span class="left">
<a href="//">portal</a><a> | </a><a href="//">root</a><a> | </a><a href="//">about</a></span>	
	<span class="right"><a>You are not logged in</a><span>
</div>

Has this thread been moved? I'm sure I didn't start it in here...

F*SH
Offline
Regular
Last seen: 13 years 24 weeks ago
Joined: 2004-02-22
Posts: 36
Points: 0

Span positioning

Ok, I've had a more in depth look at floating and it seems to be what I need...

Thanks!