Can I squeeze this down any more please?

B

Big Bill

This is a table from an e-commerce page. It's one of many. The client
wants it thinner. Not a problem if we put the form code outside the
table cell but then it breaks validation-type rules. Anyone got any
ideas what we can do to maybe externalise the form code or summat?

<table width="650" cellspacing="2" cellpadding="0" align="center"
summary="audioprocessor">
<tr>
<td align="center" class="basictxt" width="55%">Name of unit
goes here</td>
<td align="center" bgcolor="#eeeeee" width="20%"><div
class="price">&pound; 0000.00</div></td>
<td align="center" class="boldtxt" width="25%">Availability: In
Stock</td>
</tr>
<tr>
<td align="center"></td>
<td align="center" class="convertor"><a
href="http://www.xe.obvious/" target="_blank">Convert this
amount</a></td>
<td align="right"><form method="post"
action="http://cold-fusionlinkgoeshere/cf/add.cfm">
<input type="hidden" name="userid" value="00000000">
<input type="hidden" name="product" value="name of unit goes here
too">
<input type="hidden" name="price" value="0000.00">
<input type="hidden" name="return"
value="www.oursite/pageyouwereshoppingon.com/pages/audioprocessors.htm">
<input type="hidden" name="units" value="3.00">
<input type="hidden" name="qty" value="1">
<input type="submit" name="Submit" class="buynow" value="BUY
NOW"></form></td>
</tr>
</table>

See what I mean?

BB
 
S

Steve Pugh

Big Bill said:
This is a table from an e-commerce page. It's one of many. The client
wants it thinner.

Thinner meaning less pixels? Or thinner meaning less bytes?
Not a problem if we put the form code outside the table cell

Depending on where you move it to that can remove some vertical space
but it won't remove any horizontal space (forms have default non-zero
top/bottom margins not left/right margins) and won't reduce the amount
of code used, so I don't see how it can make the page 'thinner' in
either sense.
but then it breaks validation-type rules.

Not if you put it outside the entire table:
<form>
<table>
....
</table>
Anyone got any
ideas what we can do to maybe externalise the form code or summat?

If some or all of the values of the hidden fields are constant then
they can be moved to the server and incorporated into the form
handler.
<table width="650" cellspacing="2" cellpadding="0" align="center"
summary="audioprocessor">

If you want the page thinner in terms of pixels then change 650 to a
smaller number. If you want the page thinner in terms of bytes then
get rid of all those attributes and use CSS instead.

The summary is intended to be read out by speaking browsers, etc. so
it should be ordinary prose, not some meaningless run-together label
like audioprocessor.
<tr>
<td align="center" class="basictxt" width="55%">Name of unit
goes here</td>
<td align="center" bgcolor="#eeeeee" width="20%"><div
class="price">&pound; 0000.00</div></td>
<td align="center" class="boldtxt" width="25%">Availability: In
Stock</td>
</tr>
<tr>
<td align="center"></td>
<td align="center" class="convertor"><a
href="http://www.xe.obvious/" target="_blank">Convert this
amount</a></td>
<td align="right"><form method="post"
action="http://cold-fusionlinkgoeshere/cf/add.cfm">
<input type="hidden" name="userid" value="00000000">
<input type="hidden" name="product" value="name of unit goes here
too">
<input type="hidden" name="price" value="0000.00">
<input type="hidden" name="return"
value="www.oursite/pageyouwereshoppingon.com/pages/audioprocessors.htm">
<input type="hidden" name="units" value="3.00">
<input type="hidden" name="qty" value="1">
<input type="submit" name="Submit" class="buynow" value="BUY
NOW"></form></td>
</tr>
</table>

See what I mean?

Not really.

Steve
 
B

Big Bill

Thinner meaning less pixels? Or thinner meaning less bytes?

I was amiss here, I should have explained further. There are usually
several tables like this on a page, vertically aligned, with several
items in each. So it would be vertically smaller we'd be looking for.
Depending on where you move it to that can remove some vertical space
but it won't remove any horizontal space (forms have default non-zero
top/bottom margins not left/right margins) and won't reduce the amount
of code used, so I don't see how it can make the page 'thinner' in
either sense.


Not if you put it outside the entire table:
<form>
<table>
...
</table>
</form>

I'm thinking that that would only work if there were only one item per
table. I was thinking along those lines at one time. I can't remember
what turned me off the idea. Maybe I should think some more.
If some or all of the values of the hidden fields are constant then
they can be moved to the server and incorporated into the form
handler.

Ah. Now this is more like it. The only constant, though, would seem to
be the userid. Mind, it's a step in the right direction, thanks.
If you want the page thinner in terms of pixels then change 650 to a
smaller number. If you want the page thinner in terms of bytes then
get rid of all those attributes and use CSS instead.

The designer has used a whole load of CSS. It's a bit muddled in
places though.
Okey, thanks for your help.

BB
 
L

Lauri Raittila

In said:
I was amiss here, I should have explained further. There are usually
several tables like this on a page, vertically aligned, with several
items in each. So it would be vertically smaller we'd be looking for.

Even if this was first thing I thought when reading that taking form out
of table helped, you just didn't ask it (I just got exellent English
grades). CSS:
form {margin:0;}

[huge number of lines snipped]
 
B

Big Bill

Even if this was first thing I thought when reading that taking form out
of table helped, you just didn't ask it (I just got exellent English
grades). CSS:
form {margin:0;}

Erm,.......(idea!)

All your base are belong to us!

I thank you for your help, though I'm not sure I understand it.
I'll try to work it in.

BB


[huge number of lines snipped]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,731
Messages
2,569,432
Members
44,832
Latest member
GlennSmall

Latest Threads

Top