/    Sign up×
Community /Pin to ProfileBookmark

Problems with Tables…

Hi,

I have a feeling this forum is going to be my home for the next few weeks. I have done a few HTML basic pages, but I am by FAR no programmer / web developer, so simpler is better for me.

I’m trying to make everything on my site line up just right by using tables, but the problem is that they are behaving like children… just don’t do what I tell them to. Obviously I’m doing something wrong. My main problem is the column widths. I will input a width of “1” for the border to my first column, and it automatically makes it approximately 4 or 5 pixels wide. I bet if I start adding content to the other cells, it would shrink down to an eventual “1” pixel wide, but I’m making a template for the rest of my pages, and I just want it to ALWAYS be 1. Thoughts / Comments??

If my problem makes no sense, let me know, and I’ll post the syntax. Thanks!!

-BobDonut

to post a comment
HTML

8 Comments(s)

Copy linkTweet thisAlerts:
@IncaWarriorDec 11.2004 — It's much easier to deal with these problems if you use CSS and divs instead of tables
Copy linkTweet thisAlerts:
@iamlucky13Dec 11.2004 — Are you saying that the column is automatically 4-5 pixels wide? That would probably be due to the browser defaulting to a cell padding of a few pixels, so you might try setting the padding to 0 pixels.

FYI, modern standards call for developers to create layouts with divisions positioned by style sheets instead of tables for quite a few reasons. If you browse around for a while, you'll find the reasons are discussed pretty frequenty here. Tables will work in most cases, but they're not the best way to do it.
Copy linkTweet thisAlerts:
@CharlesDec 11.2004 — [i]Originally posted by iamlucky13 [/i]

[B]Tables will work in most cases, but they're not the best way to do it. [/B][/QUOTE]
Actually, they fail in most cases. And by fail I mean doesn't work on some browser. That's why we're not supposed to use them for layout.
Copy linkTweet thisAlerts:
@PeOfEoDec 12.2004 — [i]Originally posted by Charles [/i]

[B]Actually, they fail in most cases. And by fail I mean doesn't work on some browser. That's why we're not supposed to use them for layout. [/B][/QUOTE]
linearization of tables in particular is one of the major problems. Unless you go way out of your way to setup the tables in such a way that they linearize (keep them basic then use elements within the table such as lists that will force the text to break at the end of it so that text from another cell cannot intrude then go back and style them with css) you are going to have issues for audiobrille and text based browsers.
Copy linkTweet thisAlerts:
@CharlesDec 12.2004 — Screen readers handle tables in different ways. The old ones simply linerized them, the visual version of that being Lynx. But tables are a legitimate part of HTML and the newer readers are trying to present tables so that they make sense. And since tables are for displaying the relationships among data, these browsers present each data cell with its associated headers. Web authors are supposed to make clear which are the data cells and which are the header cells and which ones apply to which - using TH and TD elements and "abbr", "axis", "headers" and "scope" attributes. If you don't, these browsers simply guess. And if you are using tables for layout, they guess terribly wrong.
Copy linkTweet thisAlerts:
@BobDonutauthorDec 12.2004 — OK, you've convinced me. I'm going to learn to use CSS in place of my HTML tables. Just another thing to learn. :-) Any good tutorials out there? I went to the w3schools site, but couldn't find it... I'm probably looking for the wrong word. Is there another name for tables when using CSS?

thanks again,

-BobDonut
Copy linkTweet thisAlerts:
@IncaWarriorDec 12.2004 — With CSS you don't use tables, you split the page up into blocks that makes sense when you read the source in the HTML and then position everything and style it with CSS
Copy linkTweet thisAlerts:
@Stephen_PhilbinDec 12.2004 — Imagine divs as table cells that can be independent of any other cells and can be positioned independently of anything else. They can be any size, hold just about anything and be placed just about anywhere. So basically all you do is just grab a chunk of the page that could sensibly be classed as a division of the page, like a menu or a group of headlines or whatever, chuck 'em in a div and then place and style it as you wish (not forgetting to position and style the elements inside the div too of course. ? ).

That's all there is to it really. It all about the looks. You just use css to make everything look how you want, so you can leave your mark up to do what it's supposed to: Mark things up.
×

Success!

Help @BobDonut spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.19,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...