Jump to content

Div trouble


esoteric

Recommended Posts

Can anyone see a problem with this? I'm trying to align 3 div's next to each other, the left and center is fine but the right is too far down, the top is approx at the bottom of the other 2. I can't understand why it isn't lining up. They should all appear at the top.

 

<div id="newswrapper">
  	<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
    	<tr>
    	<?php 
	xxx
?>
        <td align="center">
                
        <div id="newsleft">
        <table width="100%">
        <tr>
          <td><span class="headline"><span class="featuredescription"><span class="checkout"><a href="<?php echo $row['frag1Link']; ?>"><img src="<?php echo $row['frag1Image']; ?>" alt="" width="300" height="100"/></a></span></span></span></td>
        </tr>
        <tr>
          <td align="center"><span class="headline"><?php echo $row['frag1Title']; ?>test</span></td>
        </tr>
        <tr>
          <td align="center"><span class="headline"><span class="featuredescription"><?php echo $row['frag1Description']; ?>test</span></span></td>
        </tr>
      	</table>
    	</div>
    
    	<div id="newscenter">
        <table width="100%">
        <tr>
          <td align="center"><span class="headline"><?php echo $row['frag1Title']; ?>test</span></td>
        </tr>
        <tr>
          <td align="center"><span class="headline"><span class="featuredescription"><?php echo $row['frag1Description']; ?>test</span></span></td>
        </tr>
        <tr>
          <td><span class="featuredescription"><span class="checkout"><a href="<?php echo $row['frag1Link']; ?>"><img src="<?php echo $row['frag1Image']; ?>" alt="" width="300" height="100"/></a></span></span></td>
        </tr>
      	</table>
    	</div>
        
        
    	<div id="newsright">
        <table width="100%">
        <tr>
          <td><span class="featuredescription"><span class="checkout"><a href="<?php echo $row['frag1Link']; ?>"><img src="<?php echo $row['frag1Image']; ?>" alt="" width="300" height="100"/></a></span></span></td>
        </tr>
        <tr>
          <td align="center"><span class="headline">test<?php echo $row['frag1Title']; ?></span></td>
        </tr>
        <tr>
          <td align="center"><span class="featuredescription">test<?php echo $row['frag1Description']; ?></span></td>
        </tr>
      	</table>
    	</div>
        </td>
    	</tr>
  	</table>
  	</div>
  	<? 
} 
?>

 

my css

#newsleft {
padding-top: 50px;
float:left;
width:330px;
margin: auto;
}
#newscenter {
float: center;
width: 330px;
margin: auto;
}
#newsright {
padding-top: 50px;
float:right;
width:330px;
margin: auto;
}

 

Thank you.

Link to comment
https://forums.phpfreaks.com/topic/245342-div-trouble/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.