I want to use html tables and css to create a very simple table.
The end result should look like:
URLLINK line1 words words
line2 words words
URLLINK line1 words words
line2 words words
[...] and onward
All the examples I find have line1 and line2 placed in there own cells
to the right of URLLINK.
URLLINK line1 line2
I know this is really simple stuff but my grasp of css or html for
that matter is quite weak.
I really don't want to back up and try to learn all about both of them
to get this little format working.
I'm not against putting in the work.. but I'm afraid it would take at
least days to get myself knowledgable enough to be able to write the
code from scratch.
I'm pretty sure if I could see an example of the format done with html
and css I would be able to edit the examples enough to get the result
I want.
I also believe I would learn what I need to know much more quickly
that way. I guess I'm trying to say, I'm not just lazy.
So, hoping someone will be able to point to an example somewhere where
I can diddle around the code.
Is this what you want?
http://edmullen.net/temp/table.html
--
Ed Mullen
http://edmullen.net
Sex on television can't hurt you unless you fall off.
>> So, hoping someone will be able to point to an example somewhere where
>> I can diddle around the code.
>
> Is this what you want?
>
> http://edmullen.net/temp/table.html
Very close... thank you. I always envy people who can just whip stuff
out like that. Also appreciate that you put in plenty of time to get
to that level.
Looks like you establish the amount of chars that can go on each line
of the cell with `width: 20em;' right?
What I actually had in mind would be something that forces 2 lines
aligned like:
this is the first line
this is the second... doesn't matter how long
Always full lines but may be variable in length.
So is there a way to force the format without pre-determining the
length of the lines?
In the actual case the lines are titles of videos so will never be
really long... but hard to say they will always be within NNem.
The lines in the actual case are being slurped from html pages that
contain javascript and have lines like:
title: 'some title',
title: 'some different length title name'
My perl code grabs everthing at such lines, between the single quotes
and prints a table insert. There will always be exactly two lines
(titles) at a time.
The whole plan here is to have an index.cgi that reads all *.html
files at that level and spits out a web page with the nifty table
showing all the links and the titles on each.
Any html files at that level will always be files that actually
present video and have javascript containing lines like shown above.
The idea being that I can add as many `file.html' (actual video
containing html files) , as I want and index.cgi will generate what is
always an acurate table of the current video.html that are present.
----- ----- ----- ===== ----- ----- -----
Yikes what was supposed to sum up what I'm trying to do (above) looks
pretty confusing... but it is all there.
OH yeah... one more thing you probably know right off the top of your
head.
When a browser hits the site, (some.site.com/) will it automatically
read `index.cgi' if no other `index' file is present?. Or does it
require the actual address (some.site.com/index.cgi)?
Or more likely even worse, some browsers will some wont?
>What I actually had in mind would be something that forces 2 lines
>aligned like:
>
> this is the first line
> this is the second... doesn't matter how long
>
>Always full lines but may be variable in length.
How about this?
<table>
<tr>
<td rowspan="2" style="white-space:nowrap; vertical-align: top;"><a
href="index.html">This is a URL</a></td>
<td>This is line 1</td>
</tr>
<tr>
<td>This is line 2</td>
</tr>
<tr>
<td rowspan="2" style="white-space:nowrap; vertical-align: top;"><a
href="index.html">This is a URL</a></td>
<td>This is line 1 and it is a really really long one which is going
to go on and on and on some more. I said, this is line 1 and it is a
really really long one which is going to go on and on and on some
more.</td>
</tr>
<tr>
<td>This is line 2 and it also is a really really long one which is
going to go on and on and on some more. I said, this is line 2 and it is
a really really long one which is going to go on and on and on some
more.</td>
</tr>
</table>
Note: Since this is quick-and-dirty, I've used inline CSS, whereas you
would want to put this in an external CSS file, at the same time
presumably adding other formatting instructions (padding, borders etc.).
--
Molly Mockford
Nature loves variety. Unfortunately, society hates it. (Milton Diamond Ph.D.)
(My Reply-To address *is* valid, though may not remain so for ever.)
[...]
> How about this?
Yeah, that is getting there.
With the exagerated length it might look pretty terrible with borders
and such... but the reality is it will never be that long so I think
this will do it.
Thanks.
> Ed Mullen <e...@edmullen.net> writes:
>>> So, hoping someone will be able to point to an example somewhere where
>>> I can diddle around the code.
>>
>> Is this what you want?
>>
>> http://edmullen.net/temp/table.html
> Very close... thank you. I always envy people who can just whip stuff
> out like that. Also appreciate that you put in plenty of time to get
> to that level.
> Looks like you establish the amount of chars that can go on each line
> of the cell with `width: 20em;' right?
> What I actually had in mind would be something that forces 2 lines
"Force" is a dirty word in these parts.
> aligned like:
> this is the first line
> this is the second... doesn't matter how long
> Always full lines but may be variable in length.
There is no layout that will guarantee that the lines will not wrap if the
browser window is made small or if the font size is increased by the viewer.
You can chop off the end of lines that are too long if that is what you
want, and that will stop wrapping.
However, this may be something like what you want if you insist it should be
a table.
<table summarry="movie titles">
<tr>
<td rowspan="2">url1</td><td>title1a</td>
</tr><tr>
<td>title1b
</tr><tr>
<td rowspan="2">url2</td><td>title2a</td>
</tr><tr>
<td>title2b</td>
</tr></table>
> So is there a way to force the format without pre-determining the
> length of the lines?
There's that word again.
> My perl code grabs everthing at such lines, between the single quotes
> and prints a table insert. There will always be exactly two lines
> (titles) at a time.
Is this your information to grab and reformat, or are you asking for help in
doing something dishonest?
> OH yeah... one more thing you probably know right off the top of your
> head.
> When a browser hits the site, (some.site.com/) will it automatically
> read `index.cgi' if no other `index' file is present?.
This depends on the configuration of the server. You have to read the
configuration file of your server or if you do not have read access you have
to ask the server administrator. Or you can just try it and see. If it
works like you hope it does that is not guarantee that it will work on a
different server.
> Or does it require the actual address (some.site.com/index.cgi)? Or more
> likely even worse, some browsers will some wont?
The server may have one or more defaults the first of which that actually
exists will be served when the browser does not request a particular page.
In your case, index.cgi must be in the server's list of defaults and none of
the things listed before it may exist. On some servers you may be able to
affect this with a directive in an .htaccess file, but not all servers use
.htaccess files, the directives do not always have the same names for
different flavors of servers, and the server configuration has to allow you
to set this particular directive in an .htaccess file.
If without .htaccess things do not work as you would like, you can look
at the documentation for the server to see if it can use .htaccess files,
and if so what this particular directive is supposed to look like. But it
still might not work because the server is not configured to allow you to
change this in .htaccess.
--
Lars Eighner <http://larseighner.com/> Warbama's Afghaninam day: 19
468.1 hours since Warbama declared Viet Nam II.
Warbama: An LBJ for the Twenty-First century. No hope. No change.
[...]
>> What I actually had in mind would be something that forces 2 lines
>
> "Force" is a dirty word in these parts.
>
>> aligned like:
>
>> this is the first line
>> this is the second... doesn't matter how long
>
>> Always full lines but may be variable in length.
>
> There is no layout that will guarantee that the lines will not wrap if the
> browser window is made small or if the font size is increased by the viewer.
> You can chop off the end of lines that are too long if that is what you
> want, and that will stop wrapping.
That sound like the way to go... chopping off. These are titles
after all and will never be really long
> However, this may be something like what you want if you insist it should be
> a table.
I don't insist on table.. no. Just the first way that looked like it
did what I wanted.
[...]
>> So is there a way to force the format without pre-determining the
>> length of the lines?
>
> There's that word again.
>
>> My perl code grabs everthing at such lines, between the single quotes
>> and prints a table insert. There will always be exactly two lines
>> (titles) at a time.
>
> Is this your information to grab and reformat, or are you asking for help in
> doing something dishonest?
Not sure if you are joking or what... but the stuff that is being
slurped is information I javascripted into the document. All images
and videos are of my own creation.
The perl code is also of my own creation. It reads html pages I
wrote and extracts certain information that is then used to create a
main index that links all the different videos or photo galleries into
one index page.
The aim here is to be able to put html documents that present videos
into my site using a basic template for them, then when someone hits
the cgi... it slurps from all the html pages and creates a sort of
master index linking them all. So its always up to date and accurate.
[...] snipped all good info about settings etc.
Thanks for the good info. I do control the server on my home setup
where this stuff is put together.. but don't have root at my internet
site. However htaccess seems to work for some things already like
password protecting the site, so may be the way to go.
At least now I have a legup from your good input.
--
jmm (hyphen) list (at) sohnen-moe (dot) com
(Remove .AXSPAMGN for email)