Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > Simple table--weird results

Reply
Thread Tools

Simple table--weird results

 
 
OccasionalFlyer
Guest
Posts: n/a
 
      08-29-2010
I don't make any claims to be an HTML expert but I've written more
than a few tables in my experience. So I am totally baffled by the
results I'm getting from some very simple table code. Alas, I can't
figure out a way to test it without making it live, so I'd appreciate
a quick response so I can get something yucky off my site please.

I used this code:
<table width="102%" cellpadding="5" cellspacing="0" border="1">
<tr align="left" valign="top" >
member
</tr>
<tr align="left" valign="top" >
1
</tr>
<tr align="left" valign="top">
2
</tr>
</table>

It displays the table, however, as only two lines:
member 1 2
dark black horizontal line
I've never seen such a thing.

What I wanted to do was this:
<table width="102%" cellpadding="5" cellspacing="0" style="border: 1px
solid black">
<tr align="left" valign="top" style="font-family: Arial; font-size:
120%; border: 1px solid black;">
member
</tr>
<tr align="left" valign="top" style="text-indent: 8px; font-family:
Arial; font-size: 100%; border: 1px solid black">
1
</tr>
<tr align="left" valign="top" style="text-indent: 8px; font-
family: Arial; font-size: 100%; border: 1px solid black">
2
</tr>
</table>

I haven't put real values on the page yet because I'm still trying to
make it work. I know that this is not how you're supposed to do CSS
but I'm trying to cope with doing HTML in an ASP.NET environment and
don't know how to cope with that.

However, this simple table ought to work. I looked at the page
source but saw nothing. Please help. Thanks.

Ken
 
Reply With Quote
 
 
 
 
OccasionalFlyer
Guest
Posts: n/a
 
      08-29-2010
Never mind. I solved my mistake. I guess I've never really made a
table this simple but I didn't know you were required to sue the td
tag. That seems dumb to me.

On Aug 28, 9:18*pm, OccasionalFlyer <(E-Mail Removed)> wrote:
> * I don't make any claims to be an HTML expert but I've written more
> than a few tables in my experience. So I am totally baffled by the
> results I'm getting from some very simple table code. Alas, I can't
> figure out a way to test it without making it live, so I'd appreciate
> a quick response so I can get something yucky off my site please.
>
> I used this code:
> *<table width="102%" cellpadding="5" cellspacing="0" border="1">
> * <tr align="left" valign="top" >
> * member
> * </tr>
> * <tr align="left" valign="top" >
> * * * * * 1
> * * * * * </tr>
> * * <tr align="left" valign="top">
> * * * * * 2
> * * * * * </tr>
> * </table>
>
> It displays the table, however, as only two lines:
> member 1 2
> dark black horizontal line
> I've never seen such a thing.
>
> What I wanted to do was this:
> <table width="102%" cellpadding="5" cellspacing="0" style="border: 1px
> solid black">
> * <tr align="left" valign="top" style="font-family: Arial; font-size:
> 120%; border: 1px solid black;">
> * member
> * </tr>
> * <tr align="left" valign="top" style="text-indent: 8px; font-family:
> Arial; font-size: 100%; border: 1px solid black">
> * * * * * 1
> * * * * * </tr>
> * * <tr align="left" valign="top" style="text-indent: 8px; font-
> family: Arial; font-size: 100%; border: 1px solid black">
> * * * * * 2
> * * * * * </tr>
> * </table>
>
> I haven't put real values on the page yet because I'm still trying to
> make it work. *I know that this is not how you're supposed to do CSS
> but I'm trying to cope with doing HTML in an ASP.NET environment and
> don't know how to cope with that.
>
> * However, this simple table ought to work. *I looked at the page
> source but saw nothing. *Please help. *Thanks.
>
> Ken


 
Reply With Quote
 
 
 
 
dorayme
Guest
Posts: n/a
 
      08-29-2010
In article
<(E-Mail Removed)
>,

OccasionalFlyer <(E-Mail Removed)> wrote:

> What I wanted to do was this:
> <table width="102%"


102% of what and why?

--
dorayme
 
Reply With Quote
 
richard
Guest
Posts: n/a
 
      08-29-2010
On Sat, 28 Aug 2010 21:18:52 -0700 (PDT), OccasionalFlyer wrote:

> I don't make any claims to be an HTML expert but I've written more
> than a few tables in my experience. So I am totally baffled by the
> results I'm getting from some very simple table code. Alas, I can't
> figure out a way to test it without making it live, so I'd appreciate
> a quick response so I can get something yucky off my site please.
>
> I used this code:
> <table width="102%" cellpadding="5" cellspacing="0" border="1">
> <tr align="left" valign="top" >
> member
> </tr>
> <tr align="left" valign="top" >
> 1
> </tr>
> <tr align="left" valign="top">
> 2
> </tr>
> </table>
>
> It displays the table, however, as only two lines:
> member 1 2
> dark black horizontal line
> I've never seen such a thing.
>
> What I wanted to do was this:
> <table width="102%" cellpadding="5" cellspacing="0" style="border: 1px
> solid black">
> <tr align="left" valign="top" style="font-family: Arial; font-size:
> 120%; border: 1px solid black;">
> member
> </tr>
> <tr align="left" valign="top" style="text-indent: 8px; font-family:
> Arial; font-size: 100%; border: 1px solid black">
> 1
> </tr>
> <tr align="left" valign="top" style="text-indent: 8px; font-
> family: Arial; font-size: 100%; border: 1px solid black">
> 2
> </tr>
> </table>
>
> I haven't put real values on the page yet because I'm still trying to
> make it work. I know that this is not how you're supposed to do CSS
> but I'm trying to cope with doing HTML in an ASP.NET environment and
> don't know how to cope with that.
>
> However, this simple table ought to work. I looked at the page
> source but saw nothing. Please help. Thanks.
>
> Ken


It's a wonder it works at all.
data within a table is placed inside a "data cell", ergo, "<td></td>" will
be required.
<tr> merely begins a new row. It does not hold the data.

Why are you trying to make the table 102% of it's container? Not possible.
 
Reply With Quote
 
dorayme
Guest
Posts: n/a
 
      08-29-2010
In article <1w3egir11n361$(E-Mail Removed)>,
richard <(E-Mail Removed)> wrote:

> Why are you trying to make the table 102% of it's container? Not possible.


Good question, there might even be a good answer. But it *is*
possible:

<style type="text/css" media="all">
div {width: 200px; height: 100px; border: 1px dotted red;}
table {width: 150%; height: 150%; border: 1px solid green;}
</style>
</head>
<body>
<div>
This is a DIV
<table>
<tr>
<td>This is a TD</td>
</tr>
</table>
</div>

--
dorayme
 
Reply With Quote
 
Jan C. Faerber
Guest
Posts: n/a
 
      08-29-2010
On 29 Aug., 14:13, dorayme <(E-Mail Removed)> wrote:
> In article <1w3egir11n361$(E-Mail Removed)>,
>
> richard <(E-Mail Removed)> wrote:
> > Why are you trying to make the table 102% of it's container? Not possible.

>
> Good question, there might even be a good answer. But it *is*
> possible:


You can also say: "I live about 24000 miles south of Austria."

> table {width: 150%; height: 150%; border: 1px solid green;}

[...]
>

*ggg*
> --
> dorayme


 
Reply With Quote
 
Neredbojias
Guest
Posts: n/a
 
      08-29-2010
On 29 Aug 2010, "Jan C. Faerber" <(E-Mail Removed)> wrote:

> On 29 Aug., 14:13, dorayme <(E-Mail Removed)> wrote:
>> In article <1w3egir11n361$(E-Mail Removed)>,
>>
>> richard <(E-Mail Removed)> wrote:
>> > Why are you trying to make the table 102% of it's container? Not
>> > possible.

>>
>> Good question, there might even be a good answer. But it *is*
>> possible:

>
> You can also say: "I live about 24000 miles south of Austria."


Not really. South is nowrap.

--
Neredbojias

http://www.neredbojias.org/
http://www.neredbojias.net/
 
Reply With Quote
 
Jan C. Faerber
Guest
Posts: n/a
 
      08-31-2010
On 29 Aug., 22:03, Neredbojias <(E-Mail Removed)> wrote:
> On 29 Aug 2010, "Jan C. Faerber" <(E-Mail Removed)> wrote:
>
> > On 29 Aug., 14:13, dorayme <(E-Mail Removed)> wrote:
> >> In article <1w3egir11n361$(E-Mail Removed)>,

>
> >> richard <(E-Mail Removed)> wrote:
> >> > Why are you trying to make the table 102% of it's container? Not
> >> > possible.

>
> >> Good question, there might even be a good answer. But it *is*
> >> possible:

>
> > You can also say: "I live about 24000 miles south of Austria."

>
> Not really. South is nowrap.
>

Not for an alien.

> --
> Neredbojias
>
> http://www.neredbojias.org/http://www.neredbojias.net/


 
Reply With Quote
 
Neredbojias
Guest
Posts: n/a
 
      09-01-2010
On 31 Aug 2010, "Jan C. Faerber" <(E-Mail Removed)> wrote:

> On 29 Aug., 22:03, Neredbojias <(E-Mail Removed)> wrote:
>> On 29 Aug 2010, "Jan C. Faerber" <(E-Mail Removed)> wrote:
>>
>> > On 29 Aug., 14:13, dorayme <(E-Mail Removed)> wrote:
>> >> In article <1w3egir11n361$(E-Mail Removed)>,

>>
>> >> richard <(E-Mail Removed)> wrote:
>> >> > Why are you trying to make the table 102% of it's container?
>> >> > Not possible.

>>
>> >> Good question, there might even be a good answer. But it *is*
>> >> possible:

>>
>> > You can also say: "I live about 24000 miles south of Austria."

>>
>> Not really. South is nowrap.
>>

> Not for an alien.


Well, he/she/it would have to be double-jointed then.

--
Neredbojias

http://www.neredbojias.org/
http://www.neredbojias.net/
 
Reply With Quote
 
OccasionalFlyer
Guest
Posts: n/a
 
      09-02-2010

> >> >> *richard <(E-Mail Removed)> wrote:
> >> >> > Why are you trying to make the table 102% of it's container?
> >> >> > Not possible.

The reason is that I copied this from another page at my site and I
assume, apparently falsely, that the author knew what he was doing. I
thought that this would make the table spill over the margins a
little. Thanks for the brief explanation of why TD is needed.

Ken
 
Reply With Quote
 
 
 
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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Using ajax call to fetch multiple results from multiple queries and showing them 1 by 1 as the results comes. Biranchi Narayan Panda ASP .Net 0 02-21-2010 03:46 PM
How can I make this more efficient? (combining DataSet results with the results of a DB lookup.) Ken Fine ASP .Net 3 07-23-2008 08:11 AM
Layout depending on simple results of a calculation Badass Scotsman ASP .Net 1 04-24-2006 05:56 PM
Prefix increment/decrement results in lvalue, but postfix one results in rvalue? lovecreatesbeauty C++ 8 09-12-2005 10:23 PM
Displaying results as "pages" of a JTable and sorting across all results ... Monique Y. Mudama Java 1 06-28-2005 01:01 AM



Advertisments