EXTREME Overclocking Forums
Home | Reviews | Forums | Downloads | $ EXTREME Deals $ | RealTime Pricing | Free Magazines | Gear | Folding Stats Newsletter | Contact Us


Go Back   EXTREME Overclocking Forums > Software Discussion > Programming, DBMS, HTML, Web Related
Register Forum Rules FAQ Search Today's Posts Mark Forums Read

Welcome Guest Visitor! Please Register, It's Free and Fun To Participate!
The EXTREME Overclocking Forums are a place for people to learn how to overclock and tweak their PC's components like the CPU, memory (RAM), or video card in order to gain the maximum performance out of their system. There are lots of discussions about new processors, graphics cards, cooling products, power supplies, cases, and so much more!

You are currently viewing our boards as a "guest" which gives you limited access to view most discussions. You need to register before you can post: click the register link to proceed. Before you register, please read the forum rules. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload your own pictures, and access many other special features. Registration is fast, simple, and absolutely free! To start viewing messages, select the forum that you want to visit from the selection below.

After you have registered and read the forum rules, you can check out the FAQ for more information on using the forum. We hope you enjoy your stay here!

Note To Spammers: We do not allow unsolicited advertising! Spam is usually reported & deleted within minutes of it being posted, so don't waste your time (or ours)!


Please Register to Post a Reply
 
Thread Tools
Old 04-23-2008, 02:02 PM   #1
gamer10101
Learning To Overclock
Senior Member
 
Posts: 122
Last Seen: 08-28-2011
From: Canada
iTrader: 0 / 0%
table problem

i'm having a little trouble with a table on my page. it works just fine in firefox but not in IE. heres a bit of my code, im stumped on whats wrong in it. i'm writing a script for an online store for fun which i'm sure i wont be publishing. my problem is the description cell starts lined up with the bottom of the img when it should be right underneath the name. instead it stretches out the name cell to the size of the image. everything else works out fine in the page (most of which was removed for simplicity). thanks for any help you guys can come up with.

Code:
<table border=0 cellspacing=0 cellpadding=4>
  <tr>
    <td rowspan=2 valign=top>
      <img height=240 src=myimg.jpg class=ProductImage></a>
    </td>
    <td width=300 valign=top height=50>
      <span class=ProductName>myname</span>
    </td>
    <td align=right valign=top width=80 height=50>
      <font color=green><b>myprice</b></font>
    </td>
  </tr>
  <tr>
    <td colspan=2 rowspan=2 width=380 valign=top height=5>
      description
    </td>
  </tr>
  <tr>
    <td align=right valign=top height=50>
    <form method=get action="/cart.php">      Order: <input type=text name=quantity value=0 size=1><br>
      <input type=submit value="Order Now!">
      </form>
    </td>
  </tr>
  <tr>
    <td valign=bottom align=left colspan=3>
      specs
    </td>
  </tr>
</table>
Canada  Offline
    Register to Reply to This Post
Old 04-23-2008, 05:49 PM   #2
jeremy
moo!
jeremy's Avatar
Senior Member
 
Posts: 819
Last Seen: 05-03-2013
Age: 25
From: near philadelphi
iTrader: 3 / 100%
Which version of IE?
United States  Offline
    Register to Reply to This Post
Old 04-23-2008, 08:07 PM   #3
gamer10101
Learning To Overclock
Senior Member
 
Posts: 122
Last Seen: 08-28-2011
From: Canada
iTrader: 0 / 0%
Quote:
Originally Posted by jeremy View Post
Which version of IE?
7.0, although i prefer 6
Canada  Offline
    Register to Reply to This Post
Old 04-24-2008, 12:16 PM   #4
dflem2003
thepeoplesgreek
dflem2003's Avatar
Senior Member
 
Posts: 238
Last Seen: 08-15-2008
Age: 28
From: Seattle, WA
iTrader: 0 / 0%
You should use embedded tables for more complex organization. (Well, you should really position everything with CSS--not to be confused with css-positioning--, but for your purpose tables are acceptable).

here is my version, which works both in IE and Firefox. I set border to 1 so you can see if everything is properly set, you can set it to zero though.

Code:
<table border=1 cellspacing=0 cellpadding=4>
	<tr>
		<td valign=top>
			<img height=240 src=myimg.jpg class=ProductImage></a>
		</td>
		<td valign=top>
			<table border="1" width="100%" height="100%">
				<tr>
					<td width=300 valign=top height=50>
						<span class=ProductName>myname</span>
					</td>
					<td align=right valign=top width=80 height=50>
						<font color=green><b>myprice</b></font>
					</td>
				</tr>
				<tr>
					<td colspan=2 width=380 valign=top height=5>
					description
					</td>
				</tr>
			</table>
		</td>

	</tr>
	
	<tr>
		<td align=right valign=top height=50 colspan=2>
			<form method=get action="/cart.php">      Order: <input type=text name=quantity value=0 size=1><br>
			<input type=submit value="Order Now!">
			</form>
		</td>
	</tr>
	<tr>
		<td valign=bottom align=left colspan=2>
		specs
		</td>
	</tr>
</table>
United States  Offline
    Register to Reply to This Post
Old 04-24-2008, 01:07 PM   #5
gamer10101
Learning To Overclock
Senior Member
 
Posts: 122
Last Seen: 08-28-2011
From: Canada
iTrader: 0 / 0%
Quote:
Originally Posted by dflem2003 View Post
You should use embedded tables for more complex organization. (Well, you should really position everything with CSS--not to be confused with css-positioning--, but for your purpose tables are acceptable).

here is my version, which works both in IE and Firefox. I set border to 1 so you can see if everything is properly set, you can set it to zero though.
thanks for the tip, works fine that way. i still can't get around what was wrong with my code though, did you see anything that might have screwed things up? i'm still gonna play around with it a bit later on to find out for future reference, and so i can sleep at night. this has been bugging me for a while now. i had another problem with ie/firefox a bit ago with a double mysql insert in firefox. problem was an empty img src address that i left empty because i hadn't made the image yet. it took me some time to figure that out too.
Canada  Offline
    Register to Reply to This Post
Old 04-25-2008, 11:26 AM   #6
dflem2003
thepeoplesgreek
dflem2003's Avatar
Senior Member
 
Posts: 238
Last Seen: 08-15-2008
Age: 28
From: Seattle, WA
iTrader: 0 / 0%
Actually yeah, now that I look at it again, the problem is that you put a rowspan=2 in the description <td>. Take that out. It should only have a colspan=2.

You can also put a colspan of 3 where the form is, to push that out to the right. Here is the code. Wow, I guess for an html old-timer like me it takes a while sometimes. I think its because I take a different approach to these things... hmm....

Heres the code, with only the rowspan taken out of the <td> tag of the description cell, and a rowspan=3 added to the form cell.

Code:
<table border=0 cellspacing=0 cellpadding=4>
  <tr>
    <td rowspan=2 valign=top>
      <img height=240 src=myimg.jpg class=ProductImage></a>
    </td>
    <td width=300 valign=top height=50>
      <span class=ProductName>myname</span>
    </td>
    <td align=right valign=top width=80 height=50>
      <font color=green><b>myprice</b></font>
    </td>
  </tr>
  <tr>
    <td colspan=2 width=380 valign=top height=5>
      description
    </td>
  </tr>
  <tr>
    <td align=right valign=top height=50 colspan=3>
    <form method=get action="/cart.php">      Order: <input type=text name=quantity value=0 size=1><br>
      <input type=submit value="Order Now!">
      </form>
    </td>
  </tr>
  <tr>
    <td valign=bottom align=left colspan=3>
      specs
    </td>
  </tr>
</table>
United States  Offline
    Register to Reply to This Post
Sponsored Links:
Please Register to Post a Reply


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

All times are GMT -6. The time now is 09:26 AM.

Copyright ©2000 - 2011, Jelsoft Enterprises Ltd.
Powered by vBulletin
Copyright ©2000 - 2011, EXTREME Overclocking