Page 1 of 1

Fetch Lining Up [Resolved]

Posted: Wed Sep 25, 2013 9:28 pm
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 :( :( :(

Re: Fetch Lining Up

Posted: Thu Sep 26, 2013 6:14 am
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>?

Re: Fetch Lining Up

Posted: Thu Sep 26, 2013 6:27 am
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 ;)