PDA

View Full Version : Tables, CSS, Invalid Code, and TypePad Notes


samwoodfin
08-05-2007, 05:26 PM
I was reading mccormicky's Many Thanks to Open Publish (http://mccormick.powweb.com/yawn/index.php?entry=entry070802-063542), and I had a few questions that seemed more appropriate to this forum than to blog comments.

My blog is run on a TypePad basic account. That leaves me very few options in terms of customization, but I CAN include code in the Notes version of TypeLists. (For those who aren't familiar with TypePad, TypeLists are whatsies that go into the sidebar.) In the interest of supporting the Red Campaign here at the Blog Experiment forum, I've used a table in one of those TypeLists to add red to the background. I'm not sure how to do this using CSS, rather than tables. Does anyone know if it would be possible to upload my own CSS file, and treat that TypeList as its own document, adding a head tag to call the CSS file? And would I end up having to use damned "div" tags to alternate the red and white?

(OK. Just typing that made me NOT want to do it...)

And, if anyone has the patience to explain it to the code-challenged, WHY are tables invalid? I.e., what negative effects do they actually have?

goldfries
08-05-2007, 05:34 PM
if your purpose requires a table - just use it.

table tags are still valid. just not advisable to use for layout purpose, but IMO it's not wrong even though some would tell you it's a sin.

smittenbite
08-05-2007, 05:45 PM
tables arent 'invalid' but theyre much less flexible when you want to change things around later on.

unfortunately i don't know how to use typepad so hopefully someone else can help you out with that

BPartch
08-05-2007, 05:50 PM
Tables are valid markup, but are meant to display data in a tabular format as a <p> tag is meant to display a paragraph.

There is nothing wrong with using a <p> tag, it is completely valid but would you use it to mark up a list of ordered ingredients?

Though having said that if you can accomplish what you are after using a table (for purposes other than it's intent) than by all means go right ahead and do so. The world will not come crashing down as a result. :)

samwoodfin
08-05-2007, 06:00 PM
...Though having said that if you can accomplish what you are after using a table (for purposes other than it's intent) than by all means go right ahead and do so. The world will not come crashing down as a result. :)

Good. I'd hate to be responsible for world-crashing! Thanks, all!

mccormicky
08-09-2007, 01:12 AM
I go on and on about it like an old gas bag. But thanks for reading it!

Stavanger
08-09-2007, 02:34 AM
You can use inline css style if you can't include a css file.

<div style="background:#f00;"><div>

deronsizemore
08-09-2007, 01:48 PM
Good. I'd hate to be responsible for world-crashing! Thanks, all!

Aww, darn. Ben got here before me. I was about to inform you that yes, the world in fact would cease to exist if you used a table. :D

I think it's all according to what you get used to. I started using CSS for layouts and honestly, I find tables very hard to deal with, but to each their own.

It's good practice to make your code semantically correct with valid markup, but as long as the site works, most users couldn't care less if it was made with CSS, Tables, or anything else for that matter.

samwoodfin
08-09-2007, 06:18 PM
Deron: You should have gotten here sooner. *shakes head* This sort of casts Ben as the Flash's evil twin, no?

I started with Tripod. "Semantically correct" just makes me think of composition classes back in college. (My creative writing prof was a linguist.)

Stavanger: If I purposely use a div tag, I have a friend in BC who's going to tell me all about the evils of that little tag, and something about Microsoft, and how she avoids all sites that use cookies. But I suppose I could use them, anyway.

mccormicky: Care to refill the gas bag (What the hell is a gas bag, anyway? Wouldn't the gas seep through?) until it really makes sense to me why I shouldn't use tables for purposes other than tabular data? I'm serious. I feel like a two-year-old who just wants to keep asking "Why?"

smittenbite
08-09-2007, 07:26 PM
mccormicky: Care to refill the gas bag (What the hell is a gas bag, anyway? Wouldn't the gas seep through?) until it really makes sense to me why I shouldn't use tables for purposes other than tabular data? I'm serious. I feel like a two-year-old who just wants to keep asking "Why?"

what id do is make a website in tables. then make one in css that shows up the same. then - try to make 5 changes to the layout and see which one you can do it on faster :)

samwoodfin
08-09-2007, 07:46 PM
Ahhh... See, that, I understand: stylesheets vs. rewriting every page in a site. With template-based sites, like blogs, though, everything changes at once, anyway.

In terms of cranking out changes to a single-page site, I can hammer out tables much, much faster than I can learn CSS. The latter ALWAYS requires a visit to W3C Schools.