Jump to content

HTML Table Cell Widths


theHammer

Recommended Posts

Is there a way to generate and maintain equal width cells in an HTML table? I have set each cell using <TD width="100"> but depending on the length of the string IE seem to follow no consistent pattern as to when to wrap text upon display. Am writing a calendar for a club and simply want the cells to be equal for each day of the week.Ed

Link to comment
Share on other sites

Guest LilBambi

For what you are wanting to do with tables, I think you may end up having to do tables within tables tables.Here's a great tutorial about making HTML Calendars in general, with a link to tables and tables within tables as well:http://www.htmlgoodies.com/tutors/calendar.htmlHere's more links to info on making calendars in HTML:http://www.google.com/search?hl=en&ie=UTF-...+calendar+tableAnother really great option is this really cool freeware HTML Calendar Generator:HTML Calendar Generatorâ„¢The Configuration - Appearance page has a check box for 'equal column width.'

Edited by LilBambi
Link to comment
Share on other sites

Marsden's suggestion to use a percentage for both the table width and the cell width holds each cell constant no matter the length the enclosed string. If I place that in an "overall" table sized at width="750" the latter does not interfere with the "constant" cell width yet holds the overall table size less that 800 to prevent horizontal scrolling for those that the many that limit resolution to 800 x 600. I don't understand why the using a fixed pixel width does not work but this is certainly the suggestion I needed. What a great list of calendar references offered by LilBambi. Obviously I am not the first to want to place a calendar on the net<g>. Somewhere, and I will look diligently; I may find the answer to limitation using cell width in pixels.Lastly just for general information, others responsible for the calendar content create the "line items" in a spreadsheet column. I export to text format, read and parse with a VB program and merge into a basic template of the HTML calendar. Push-pull click click and the new calendar will be on the web each month.Thanks again,Ed

Link to comment
Share on other sites

The Calendar Creater program that LilBambi referenced is one fancy piece of work and I was surprised to see that it permits importing content. Now I will have to check out just how it works, but I have had a problem from day one - I'd rather do it myself<g>. My only fear at this point is that it may do it it better.Ed

Link to comment
Share on other sites

Guest LilBambi

Ed,I hear ya! LOL! I felt the same way before using HTML Calendar Generator ... I had been using Excel spreadsheets too. But I would save the .xls as tab delimited text, convert to a table in AscToTab*. Then copy and paste resultant table into my HTML document.The above still works great for any type of data to create an HTML table ... at least non-calendar tables ... it has been a while since I had to worry about calendar tables not doing right. >_

Link to comment
Share on other sites

I agree that the Calendar Creator is one great concept but have played with enough to "pass" - yet gained several layout ideas. LilBambi's approach of creating a tab delimited file and then using AsctoTab is clever and I will keep a copy of AsctoTab my library. Still think I will stay with my simple column of activities (actually the spreadsheet has three columns, day of week, day number and activity). This is easily filled in by anybody with minimal knowledge of spreadsheet usage. Since I have already written my parse and write VB program I let it do the "copy and paste" paste into an HTML template and voila, a calendar? So I have leaned to use width=% (still not sure why) and that by putting a table around my calendar table I can control it's absolute size (to prevent a user opening in a small window and shrinking the cells to an extreme (remember width = 12 1/2%) yet limit to a reasonable appearance size. Better yet I will provide a "printer friendly version" under a button that will fix the width at bit larger such that it will fit in landscape view on 8 1/2 x 11 paper.Ed

Link to comment
Share on other sites

Guest LilBambi

Yes, each project calls for its own unique approach. That's why I keep so many tools available.Sounds like your vb program is a pretty handy tool too! I like it. B)

Link to comment
Share on other sites

Great resources. I can see I am going to have to bookmark this thread and pull it up for my web design students in a couple of weeks once they get past the very basics. B)

Link to comment
Share on other sites

Realize that I am preaching to experts but can't resist throwing out what I leaned in my limited experience writing and maintain a bait store web site - for about eight years. First and obvious to all of you was keep it simple. Until I leaned that I spent far to many hours looking at my pages under three versions of Netscape, two of IE and two of AOL - and then spending four times as many trying to find the common denominator. Second I found I hate maintenance. Once the challenge of coding was accomplished, maintenance was work. Fortunately I have some programming experience and found VB rather useful. Each week we had four to a dozen pictures of fisherman and their catches to add to the site. I wrote a program where I entered file name and associated description for each (fisherman’s name and weight and length of the catch), pushed the button and it created a new page of pictures for the week, modified a table by adding a new hyperlink on a selection menu page and then uploaded both pages to the site. Wrote several of these maintenance programs to either create new pages or modify information on others, then upload. Each was basically a simple read and write of the HTML code looking for a key word, then inserting new information or modifying and then continuing to read and write out the balance of the template code. Ed

Link to comment
Share on other sites

Guest LilBambi

That definitely sounds like site maintenance/additions made easy!It sounds much like php template webpage additions and blog site additions but for standard HTML.Efficient and easy to use. Great job! B)

Link to comment
Share on other sites

Second I found I hate maintenance. Once the challenge of coding was accomplished, maintenance was work.
I feel the same way. I just started using Movable Type a while back. Once it was up and running, it made maintaining my site really easy.
Link to comment
Share on other sites

  • 2 weeks later...

<td width="N%"> where N=100/(the number of columns)Saw the earlier reply. Yeah, it would help if the Table itself was at 100% before calling out percentages within it. After checking my calculator, 100/7=14.29

Edited by trigggl
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...