Aligning?

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
Zorth
Forum Commoner
Posts: 76
Joined: Fri Feb 20, 2004 8:00 pm

Aligning?

Post by Zorth »

This may sound dumb but...

How would you align something not in the center, but sort of between the center and the left side of the page? Tables don't really seem to be a big help here, and I see no other way really than putting a ton of " "s.
User avatar
Bill H
DevNet Resident
Posts: 1136
Joined: Sat Jun 01, 2002 10:16 am
Location: San Diego CA
Contact:

Post by Bill H »

Try using a table with the margins set as needed.
User avatar
m3mn0n
PHP Evangelist
Posts: 3548
Joined: Tue Aug 13, 2002 3:35 pm
Location: Calgary, Canada

Post by m3mn0n »

A table inside of a table..

<div> and it's exact positioning

there is a multitude of ways...
User avatar
no_memories
Forum Contributor
Posts: 145
Joined: Sun Feb 01, 2004 7:12 pm
Location: New York City

Post by no_memories »

This is just one of many ways to accomplish what you described.

Style:

Code: Select all

.leftcenter &#123;
position: relative; /* its better to use the relative attribute for this purpose */
top: 10%; /* this can be in a px value also */
left: 10%; /* same as above */
&#125;
Markup:

Code: Select all

<table border="" cellspacing="" cellpadding="" summary="">
<tr><td>

<div class="leftcenter">This or That</div>

</td></tr>

<tr><td>

<div class="leftcenter">This or That</div>

</td></tr>
</table>
Post Reply