Fetch Lining Up [Resolved]

Place for questions and answers for all newcomers and new coders. This is a free for all forum, no question is too stupid and to noob.
Post Reply
User avatar
Epiales
Posts: 1119
Joined: Thu Aug 15, 2013 1:38 am

Fetch Lining Up [Resolved]

Post by Epiales »

Okay, I am redoing the website as far as the way it looks. I'm having a problem lining up the items from the database. I have no idea why the 'use item' will not line up with the rest of the items. Here's a picture:

Image

As you can see, the links to use the item are 'above' the actual items.

Here is the div information:

Code: Select all

<div align="left" class="itemleft"><?php echo $row["name"]; ?></div>            
<div align="center" class="itemcenter"><?php echo $row["total"]; ?></div>
<div align="center" class="itemright">Adds: <?php echo $row["statadd"]; ?></div>
<input type="hidden" id="hidden" name="hidden" value="<?php echo $row["id"]; ?>">
<div align="left"><?php echo "<A href='battle1.php?randid=$row[randid]'?><font color='red'>Use Item" ?></a></font></div>
Here's the CSS:

Code: Select all

.itemleft {
    float: left;
    width: 95px;
	color:#00FF00;
	margin: 20px 0px 0px 30px;
}

.itemcenter {
    float: left;
    width: 10px;
	color:#00FF00;
	margin: 20px 0px 0px 30px;
}

.itemright {
    float: left;
    width: 100px;
	color:#00FF00;	
	margin: 20px 0px 0px 30px;
}
I don't see any reason why it shouldn't line up, but would appreciate if someone could tell me grrr. Thx

*EDITED*

Now I did try and put a css and div class for the actual "Use Item" links as well, but it messed it all up :( :( :(
Last edited by Epiales on Thu Sep 26, 2013 6:27 am, edited 1 time in total.
Nothing fancy, but a work in progress!

http://gameplaytoday.net
Winawer
Posts: 180
Joined: Wed Aug 17, 2011 5:53 am

Re: Fetch Lining Up

Post by Winawer »

You have margin-top in the CSS classes but nothing for the link div.

It looks like you're trying to make a table with divs. Why not just use a <table>?
User avatar
Epiales
Posts: 1119
Joined: Thu Aug 15, 2013 1:38 am

Re: Fetch Lining Up

Post by Epiales »

Winawer wrote:You have margin-top in the CSS classes but nothing for the link div.

It looks like you're trying to make a table with divs. Why not just use a <table>?
Thanks! I just did the table. Everything's lined up ;)
Nothing fancy, but a work in progress!

http://gameplaytoday.net
Post Reply

Return to “Beginner Help and Support”