Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

HELP: Problem with drop down pos

Status
Not open for further replies.

snowboardr

Programmer
Feb 22, 2002
1,401
PH
I cant seem to get the drop down to valign center in the cell it looks on the very top in IE but in Firefox it looks perfecto.

<table width="795" border="0" align="center" cellpadding="0" cellspacing="0" class="fBrdr">
<tr>
<td width="51" height="0"> <div align="center"><img src="images/forum/small/refresh_icon.gif" width="40" height="40"></div></td>
<td width="706"><table width="48%" border="0" cellspacing="0" cellpadding="1">
<tr>
<td><div align="right" class="bluet">Topic:</div></td>
<td><form name="form1" method="post" action="">
<select name="select" class="tbx">
<option value="1">2</option>
<option value="3" selected>2</option>
</select>
</form></td>
</tr>
</table></td>
</tr>
</table>

www.sitesd.com
ASP WEB DEVELOPMENT
 
Have you tried adding valign="middle" to the inner-most cell (td)?
 
btw i changed it from the drop down to the text fields to see if it made a difference... no...

good ole firefox..is better then IE it seems..

www.sitesd.com
ASP WEB DEVELOPMENT
 
Ah, now that I see it, how about in this one:
Code:
<td width="706">
becomes
Code:
<td width="706" valign="middle">
?
 
This is what i have...

<img src="images/forum/small/spacer.gif" height="1">
<table width="795" border="0" align="center" cellpadding="0" cellspacing="0" class="fBrdr">
<tr>
<td width="59" height="0" rowspan="2"> <div align="center"><img src="images/forum/small/refresh_icon.gif" width="40" height="40"></div></td>
<td width="107" class="mt">Author:</td>
<td width="627"><span class="mt">Subject:</span></td>
</tr>
<tr>
<td height="22" colspan="2" valign="middle"><form name="form1" method="post" action="">
<input name="author" type="text" class="tbx" id="author" size="14">
<input name="textfield" type="text" class="tbx">
</form></td>
</tr>
</table>
<img src="images/forum/small/spacer.gif" height="1">

I just need it to look right in IE... but Firefox shows it perfect.

www.sitesd.com
ASP WEB DEVELOPMENT
 
Ah, so your whole table needs to be vertically aligned to the middle. What container are the graphic and table in? That's the one that needs a valign="middle" if it's a table cell. I'd think.
 
Well i think its working now for the time being.. this what did it:

CSS

.tbx2 { /* txt box code */
border: 1px solid #CCCCCC;
vertical-align:inherit;
}

www.sitesd.com
ASP WEB DEVELOPMENT
 
Hey snowboardr,

I am sure you checked this out already, but IE and Firefox interpret "newlines" in the HTML different. Remove the newlines around your 1px spacers before and after the table:

Change:
Code:
<img src="images/forum/small/spacer.gif" height="1">
<table width="795"  border="0" align="center" cellpadding="0" cellspacing="0" class="fBrdr">

Into:
Code:
<img src="images/forum/small/spacer.gif" height="1"><table width="795"  border="0" align="center" cellpadding="0" cellspacing="0" class="fBrdr">

I just took out the carriage return after the <img> tag and move the <table> tag right after it. Spaces and Carriage returns will affect the look of pages sometimes, especially when you want to squeeze tables together.

Do the same to the bottom of your table:

Change:
Code:
</table>
<img src="images/forum/small/spacer.gif" height="1">
Into:
Code:
</table><img src="images/forum/small/spacer.gif" height="1">
Hope that helps. It's the first thing I noticed...

Gerrit
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top