Jump to content

[SOLVED] Problem with Div Inside an Anchor Tag


limitphp

Recommended Posts

I have a div inside a table, and it seems to be taking the width of the table instead of itself.

<TABLE CELLPADDING="0" CELLSPACING="0" BORDER="0" STYLE="width:100%">
<TR>
	<TD VALIGN="top" STYLE="width:100%">
		<a href='www.index.com' class='pagination_link'>
		<div align='center' class='pagination_div'>« Previous</div></a>
		<a href='www.index.com'>2</a>
	</TD>
</TR>
</TABLE>

 

The div uses class "pagination_div"

which is defined here:

.pagination_div {border-style:solid; border-width:1px; width:80px; padding:0px; margin:0px}

 

The border shows up on the div, and it appears to only be 80px wide, but the link is active all the way acroos the page (100%)....it seems to take after the 100% width from the table.

The other link with the number 2 <a href='www.index.com'>2</a>

starts on the next line.

 

Does anyone know why the div's border is only 80px wide, but the div itself seems to take up the entire line?

 

Am I missing something here?

 

 

 

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.