PDA

View Full Version : Small Postbit question



Mr. X
Sun 10th Mar '02, 5:12am
I want to center the user info, similar to what IdealBB or Fusetalk does.

Now the default postbit code for the userinfo assuming Im correct is this:


<td bgcolor="$post[backcolor]" width="175" valign="top" nowrap>
<a name="post$post[postid]"></a>
$post[firstnewinsert]
<normalfont><b>$post[username]</b></normalfont><br>
<smallfont>$post[usertitle]</smallfont><br>
$post[avatar]<p>
<smallfont>Registered: $post[joindate]<br>
Location: $post[field2]<br>
Posts: $post[posts]</smallfont></td>

Now, I copied this into Dreamweaver, and made it center. This is what it spits out:


<td bgcolor="$post[backcolor]" width="175" valign="top" nowrap>
<div align="center"><a name="post$post[postid]"></a> $post[firstnewinsert] <normalfont><b>$post[username]</b></normalfont><br>
<smallfont>$post[usertitle]</smallfont><br>
$post[avatar]</div>
<p align="center"> <smallfont>Registered: $post[joindate]<br>
Location: $post[field2]<br>
Posts: $post[posts]</smallfont>
</td>

As far as alignment goes, its perfect. I see that on very long posts say with a bunch of images, the user info stays center and ON TOP. The last time I did this, it would be in the middle of the post, no matter how long or short it was. (I cant find the thread where I learned how to do it before, but regardless it didnt work right).

However, being the picky dork that I am, I would like it so that everything under the Avatar is closer up, and that each line is in the same proximity. See attachment for an idea of where Im getting at. Assuming of course this is all possible. If not, no biggie.

Scrubby
Sun 10th Mar '02, 5:38am
<td bgcolor="$post[backcolor]" width="175" valign="top" nowrap>
<div align="center"><a name="post$post[postid]"></a> $post[firstnewinsert] <normalfont><b>$post[username]</b></normalfont><br>
<smallfont>$post[usertitle]</smallfont><br>
$post[avatar]<br>
<smallfont>Registered: $post[joindate]<br>
Location: $post[field2]<br>
Posts: $post[posts]</div></smallfont>
</td>


:)

XiXora
Sun 10th Mar '02, 8:50am
dreamweaver loves the <p> tag which makes the extra spaces.
hold shift then enter for <br>
:)

Mr. X
Sun 10th Mar '02, 5:20pm
Sweet thanks, works exactly the way I want it :)

Yeah, I was looking at the <p> tag, playing around with it, but didnt exactly know what to do with it.

|GMK|PlaTooN
Thu 28th Mar '02, 11:48pm
how would you just center the username and the avatar without centering the rest since I got some level hacks below..?

|GMK|PlaTooN
Fri 29th Mar '02, 3:23am
Hehe, well I fixed it, decided to put everything in a table to make it look cleaner looks great now.