Connecting Tech Pros Worldwide Forums | Help | Site Map

A question about tables

Mr. Teatime
Guest
 
Posts: n/a
#1: Jul 23 '05
http://www.teatime.pwp.blueyonder.co.uk/music.htm

I'd like the text that has 'more information | time ... size... | Download'
to line up each time it repeats - i.e. have it in a table, but can't seem to
get it to work in the javascript, it always adds an extra line when I try to
put in a table (there's a blank space between the javascript link 'more
information' and the rest of the normal text, when I use a table). Any help?
TIA

--
My music - http://www.jonathandalton.com



Ivo
Guest
 
Posts: n/a
#2: Jul 23 '05

re: A question about tables


"Mr. Teatime" wrote[color=blue]
> http://www.teatime.pwp.blueyonder.co.uk/music.htm
>
> I'd like the text that has 'more information | time ... size... |[/color]
Download'[color=blue]
> to line up each time it repeats - i.e. have it in a table, but can't seem[/color]
to[color=blue]
> get it to work in the javascript, it always adds an extra line when I try[/color]
to[color=blue]
> put in a table (there's a blank space between the javascript link 'more
> information' and the rest of the normal text, when I use a table). Any[/color]
help?[color=blue]
> TIA[/color]

Not a javascript problem at all. A table would help, but better is proper
mark up and some styling.
This is your current code:

    |    Time: 13.58    Size:
12.70 Mb&nbsp;&nbsp;&nbsp; | <a href="music/Primed.mp3"> &nbsp;&nbsp;&nbsp;
<u>Download</u></a>

Compare with for example:
<style type="text/css">
..time{ width:6em; }
..size{ width:6em; margin:0 .2em; }
..dload{ width:6em; text-decoration:underline; }
</style>
<span class="time">Time: 13.58</span>
<span class="size">Size: 12.70 Mb</span>
<a class="dload" href="etc">Download</a>

HTH
Ivo



Mr. Teatime
Guest
 
Posts: n/a
#3: Jul 23 '05

re: A question about tables


[color=blue]
> Not a javascript problem at all. A table would help, but better is proper
> mark up and some styling.
> This is your current code:
>
> &nbsp;&nbsp;&nbsp; |&nbsp;&nbsp;&nbsp; Time: 13.58&nbsp;&nbsp;&nbsp; Size:
> 12.70 Mb&nbsp;&nbsp;&nbsp; | <a href="music/Primed.mp3">[/color]
&nbsp;&nbsp;&nbsp;[color=blue]
> <u>Download</u></a>
>
> Compare with for example:
> <style type="text/css">
> .time{ width:6em; }
> .size{ width:6em; margin:0 .2em; }
> .dload{ width:6em; text-decoration:underline; }
> </style>
> <span class="time">Time: 13.58</span>
> <span class="size">Size: 12.70 Mb</span>
> <a class="dload" href="etc">Download</a>
>
> HTH
> Ivo[/color]


Ok I think I see what you're doing. I'd like to keep the | in though as a
break, so it looks the same as it is now, except each time it lines up with
the previous one. I think I need to create another class for the | ?

--
My music - http://www.jonathandalton.com


Ivo
Guest
 
Posts: n/a
#4: Jul 23 '05

re: A question about tables


"Mr. Teatime" wrote[color=blue][color=green]
> > This is your current code:
> > &nbsp;&nbsp;&nbsp; |&nbsp;&nbsp;&nbsp; Time: 13.58&nbsp;&nbsp;&nbsp;
> > Size: 12.70 Mb&nbsp;&nbsp;&nbsp; | <a href="music/Primed.mp3">
> > &nbsp;&nbsp;&nbsp; <u>Download</u></a>
> >
> > Compare with for example:
> > <style type="text/css">
> > .time{ width:6em; }
> > .size{ width:6em; margin:0 .2em; }
> > .dload{ width:6em; text-decoration:underline; }
> > </style>
> > <span class="time">Time: 13.58</span>
> > <span class="size">Size: 12.70 Mb</span>
> > <a class="dload" href="etc">Download</a>[/color]
>
> Ok I think I see what you're doing. I'd like to keep the | in though as a
> break, so it looks the same as it is now, except each time it lines up
> with the previous one. I think I need to create another class for the | ?[/color]

By all means, keep the pipe (that 's how it 's called over here), inside or
in between the spans, or in its own span, whatever you think is the easiest
(I think I 'd put it in between). My only point is that you can control
positioning with css better than with &nbsp;'s.
HTH
Ivo



Mr. Teatime
Guest
 
Posts: n/a
#5: Jul 23 '05

re: A question about tables



[color=blue][color=green][color=darkred]
> > > <a class="dload" href="etc">Download</a>[/color]
> >
> > Ok I think I see what you're doing. I'd like to keep the | in though as[/color][/color]
a[color=blue][color=green]
> > break, so it looks the same as it is now, except each time it lines up
> > with the previous one. I think I need to create another class for the |[/color][/color]
?[color=blue]
>
> By all means, keep the pipe (that 's how it 's called over here), inside[/color]
or[color=blue]
> in between the spans, or in its own span, whatever you think is the[/color]
easiest[color=blue]
> (I think I 'd put it in between). My only point is that you can control
> positioning with css better than with &nbsp;'s.
> HTH
> Ivo
>
>
>[/color]


This solution also doesn't solve the problem that I want the text to line up
as if it's in a table: the solution you offered means that the text won't
line up, since the text itself is different each time (different times,
different file sizes), all this has done is made the space between the text
constant, but since the text length itself varies it doesn't line up.... any
other ideas?

TIA

--
My music - http://www.jonathandalton.com


Ivo
Guest
 
Posts: n/a
#6: Jul 23 '05

re: A question about tables


"Mr. Teatime" wrote[color=blue]
> This solution also doesn't solve the problem that I want the text to line[/color]
up[color=blue]
> as if it's in a table: the solution you offered means that the text won't
> line up, since the text itself is different each time (different times,
> different file sizes), all this has done is made the space between the[/color]
text[color=blue]
> constant, but since the text length itself varies it doesn't line up....
> any other ideas?[/color]

You may need to fiddle a bit with the widths set in the classes to get it
work the way you want (and keep in mind that users may have strange fonts or
font sizes), but I just did another test, and the code below renders the two
pipe characters in a straight vertical line...

<style type="text/css">
..time{ width:6em; }
</style>
<span class="time">Time: 2.13.58</span> |<br>
<span class="time">Time: 0.01</span> |

Otherwise, take your question to a ccs newsgroup. We 're way off topic here.
HTH
Ivo



Closed Thread