Page 1 of 1

Setting table column width problem

Posted: Thu 29 Dec 2011 4:48 pm
by RayProudfoot
I cannot get one of my web pages to look as I wish it to. I have heavily adapted the pages supplied with Cumulus over the last couple of years and although I still have a lot to learn I had hoped I knew enough to make this kind of change.

Here is the webpage http://www.cheadlehulmeweather.co.uk/thismonthyear.htm

And here is the code that sets up the width of each table column

<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tbody>
<tr>
<td>&nbsp;</td>
<td colspan="2" bgcolor="#CCCCCC">This Month</td>
<td colspan="2" bgcolor="#CCCCCC">This Year</td>
</tr>
<tr>
<td colspan="5" class="tableseparator">Temperature and Humidity</td>
</tr>
<tr class="tableseparator_data">
<td width="20%">High&nbsp;Temperature</td>
<td width="15%" class="tableseparator_new"><#MonthTempH><#tempunit></td>
<td width="25%">at&nbsp;<#MonthTempHT> on day&nbsp;<#MonthTempHD format="d"></td>
<td width="15%" class="tableseparator_new"><#YearTempH><#tempunit></td>
<td width="25%"> at&nbsp;<#YearTempHT>&nbsp;<#YearTempHD format="d mmmm"></td>
</tr>

I want column one to be a bit wider than it is and columns 3 and 5 to be a bit narrower.
I have tried using Dreamweaver 4 to change the column widths by grabbing the column divider and dragging it but it won't move them. I suspect it's because of the length of the webtags rather than what they will become once Cumulus has processed the page contents.

If that is indeed the problem how can it be solved? Thanks for any advice.

Later: Thought it might help if I showed the appearance of this in DreamWeaver.
ThisMonthYear.jpg

Re: Setting table column width problem

Posted: Thu 29 Dec 2011 7:23 pm
by RayProudfoot
*********** PROBLEM SOLVED!! *****************

Whilst I couldn't drag the column dividers in DW I can enter the column widths in the code. Strange why DW won't let you but I suspect it's because you can't wrap a single piece of text - the webtags.

Re: Setting table column width problem

Posted: Mon 02 Jan 2012 3:21 pm
by gemini06720
Ray, although you have solved the width problem of your table, not too long ago, I discovered this HTML <col> Tag - I also used to include the table column width in the <td> tag, but I have been modifying my tables to now use the <col> tag...

Re: Setting table column width problem

Posted: Mon 02 Jan 2012 7:29 pm
by RayProudfoot
Thanks Raymondo. :D I shall look into that in slow time. I still have so much to learn.

Re: Setting table column width problem

Posted: Tue 03 Jan 2012 1:30 pm
by gemini06720
Indeed, 'the other Ray'... :D

I am learning something new almost every days... :)

I have been spending much of my 'awake' time setting up my three new computers - all of them have their operating software/system and almost all of the daily used utilities. Over the past couple of days, I have been working on (setting up) my music (broadcasting) computer with up-to-date version of the software I was running ... it has been a steep learning curve, all that new stuff, all those new parameters, all those new settings... :?

Re: Setting table column width problem

Posted: Tue 03 Jan 2012 6:20 pm
by RayProudfoot
Sounds like you have plenty to keep you out of mischief Raymondo! I have a project of my own but only after retirement. I want to learn how to build and interrogate a SQLLite database so I can provide loads of stats on my website. That's where my Access knowledge should come in useful.

That should keep me out of mischief for some time. :D

Re: Setting table column width problem

Posted: Wed 04 Jan 2012 3:50 am
by gemini06720
Ray, rather than 'limit' yourself to SQLLite, may I recommend that you go with the MySQL - it is much more powerful and well supported database format (many book written about MySQL) with many utilities available... ;) ...and probably not much more difficult for you, at your age, to learn and master... :mrgreen:

As someone wrote to me: "Ever noticed, the older we get, the more we are like computers? We start with lots of memory and drive, then we eventually become outdated, crash at odd moments, acquire errors in our systems, and have to have our parts replaced." :D

Re: Setting table column width problem

Posted: Wed 04 Jan 2012 11:18 am
by serowe
gemini06720 wrote:As someone wrote to me: "Ever noticed, the older we get, the more we are like computers? We start with lots of memory and drive, then we eventually become outdated, crash at odd moments, acquire errors in our systems, and have to have our parts replaced." :D
You forgot the biggest problem:
and become increasingly slower and and slower and require, every so often, a good blast to clear out all the dust and cobwebs.

Re: Setting table column width problem

Posted: Wed 04 Jan 2012 12:14 pm
by gemini06720
Thanks Ray, you made my day ... if I could only get rid of some of the cobwebs... :mrgreen:

Re: Setting table column width problem

Posted: Wed 04 Jan 2012 5:11 pm
by RayProudfoot
gemini06720 wrote:Ray, rather than 'limit' yourself to SQLLite, may I recommend that you go with the MySQL - it is much more powerful and well supported database format (many book written about MySQL) with many utilities available... ;) ...and probably not much more difficult for you, at your age, to learn and master... :mrgreen:
Thank you Raymondo. I think that is what I probably intended to use. The grey cells are still in good condition despite a week of dossing around the house. Most of my hobbies are brain-driven as opposed to movement driven (walking!). ;)
As someone wrote to me: "Ever noticed, the older we get, the more we are like computers? We start with lots of memory and drive, then we eventually become outdated, crash at odd moments, acquire errors in our systems, and have to have our parts replaced." :D
You need a defrag! I have one often and it makes the world of difference! :D

Re: Setting table column width problem

Posted: Wed 04 Jan 2012 8:23 pm
by serowe
gemini06720 wrote:Thanks Ray, you made my day ... if I could only get rid of some of the cobwebs... :mrgreen:
<cough> I'm not Ray.... <cough>