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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.