based on smarty templates theme, i've been (trying to) develop a tabless CSS layout... anyone else succeed?

in order to get my design working, i needed to eradicate some of the table formatting that was in the book.module and the comment.module...

that's not a great way to make themes, is it?

i wish i could post my tabless CSS idea, and have other people play with it and improve it... but it's so kludgy, what with all the module hacks in it. eek.

i was trying to make something that is based on header, paragraph tags, and simple 'content' area and 'menu' area with a header and footer, so it would be laid out much like this drupal site. (with other colors, of course)

here is the example: http://artists.nearlythere.com

if anyone wants to have the CSS, grab it, and i can point out what changes need to be made to the book and comment modules. eek.

Comments

troy-1’s picture

Have a look at linux.tkdack.com.

It is an attempt at a tableless css layout. I have had to tweak a couple of modules (can't remember which ones, but I could run a diff). I haven't dug right into the core of the code though and attempted to remove all tables.

I've also made a few minor tweaks to some of the other markup to make the generated html compliant with html-4.01 transitional. Generally my pages validate, if they don't it is probably because of missing 'alt' tags on images.

The css for my site is in a couple of files, a quick "view source" will show the locations, feel free to grab and play.

Note: The style sheet changer and block hiding doesn't seem to work too well in some browsers (Konq and Moz-Win)

Anonymous’s picture

Nice.

Our Drupal world would be a better place if theme designers would report back their exerpiences as well as submit patches that remove all embedded markup. Please, get in touch with the developers on the mailing lists.

Kjartan’s picture

I'm not sure removing all markup is what is needed. We still need a way to add markup to the content. What is needed is to move all the markup generating code into theme_invoke() functions so themes can override them any way they want. Patches welcome Only local images are allowed.

--
Kjartan

troy-1’s picture

OK, subscribed to drupal-devel.

I haven't removed all embedded markup, just tidied up a few bits and pieces here and there.

I guess I'll have to pull the latest cvs and give that a shot.

I'm also not really a theme designer (or coder for that matter), but if it helps make Drupal better then I'll send in some patches.

adrian’s picture

I have already started getting the embedded mark-up out of the forum module for my uses.

Is there a feature request to be able to skin modules using templates?

heather’s picture

i am planning (heh) on getting drupal to validate as XHTML... (please don't check it now, it *seriously* is not validating)

one of the biggest problems is the query string URLs... you'll get those 'refc delimiter' errors...
http://www.htmlhelp.com/tools/validator/problems.html#amp

BUT! do i want to go in and change how the URLs are printed? no no no...

I want mod_rewrite implemented. That would be much more user friendly and much better for me and you. And it would validate, and make everyone happy!

Here here! The Campaign for mod_rewrite has begun!

Dries’s picture

It looks nice and clean. However, the comment related bits (such as here) strike me as somewhat confusing ... Maybe try putting more structure in the comments and the control panel, or try making all Drupal links (ie. internal links such as "add new comment", "reply to this comment", etc.) stand out from the other links such that it is clear what links can be used to operate the site and what links will refer you to other content or another website. Right now is looks as if the "reply to this comment"-link is part of the comment's body.

Just my two cents.

heather’s picture

indeed! thanks for the feedback.

i am side tracked on another aspect of the project right now, and i sloppily left the comments module undone. (i also wanted to make some other functional changes to the comment module, like linking to parent, etc etc)

it's next on the list.

thanks thanks! (one for each of 2 cents!)

moshe weitzman’s picture

Also see tableless, a great all CSS theme for Drupal.

0116’s picture

Here's the newer link to that - if it's changed again, just head for cvs.drupal.org
I'd like to stress the importance of separating content and design from presentation - (yeah, there's visual and informational design - two different animals)
I think it would be proper to have themes and visuals separate from the drupal engine- and tables are definetely a thing of the past...

http://cvs.drupal.org/viewcvs/contributions/themes/tableless/?cvsroot=co...

Steven’s picture

My website also has a tableless theme. I remember I had to remove the width=100% attribute from most tables (e.g. forum2.module), because of a bug in IE6. If a 100% width item is positioned in a padded box, then IE6 will use the padded width for the item, not the inside-width, causing the padde box to get stretched. Sucks maaajorly.

Anonymous’s picture

have you gotten any further on the table-less
css layout? I went to your site, http://artists.nearlythere.com ,
but only got a blank page.

I was surprised to not find any style sheets any where in the
themes in drupal. The closest thing would be the smarty templates.
This is my second shot at a CMS system. I played around with
slashcode, but was overwhelmed with all the templates there.

I avoided the phpNuke genre after trolling user groups and getting the
impression they code was messy and there were soap opera type
infightings amongst the developers. Somehow I ended up at drupal.

- greg s.

heather’s picture

sorry about that... no i never got further. stay away from smarty it does not have all the features of a full template.

this was a good link from someone:
tableless in the cvs repository

(i had to take the site down. i am thinking of NOT using drupal, can you imagine that? i was getting frustrated with the *&$^@ing thing. i might just use some plain old html until i get a brain.)

Dries’s picture

Why is it you got frustated? Talk and work with us, and we'll try healing you. Like, start compile a constructive list of frustrating things and post them in a new forum topic. Only local images are allowed.

horix’s picture

what is so bad about tables within a theme? i use them on my site (http://www.wornpath.net) and i'm happy with the result. i have a little trouble with inheiritence (that UnConeD helped me with), but with that straigtened out it looks great. i just find tables such an easier way to organize the content.. why do they seem to be the bane of everyone else's exsistence?

--
horix
horix@wornpath.net

ax’s picture

there's nothing bad about using tables if you use them for structuring content into rows and columns of cells only. point is that mostly, they are not used for this, but for layout purposes only. see http://www.w3.org/TR/REC-html40/struct/tables.html#h-11.1:

Tables should not be used purely as a means to layout document content as this may present problems when rendering to non-visual media. Additionally, when used with graphics, these tables may force users to scroll horizontally to view a table designed on a system with a larger display. To minimize these problems, authors should use style sheets to control layout rather than tables.

and "Tables are dead..."

adrian’s picture

Tables make your site less accessible and less standards compliant.

To Hell With Bad Browsers [www.alistapart.com]

Table Manners[www.mcu.org.uk]

Plus , tables also make your layouts harder to debug and longer to load.

horix’s picture

ok.. thanks guys. didnt realize that tables were so passe, but i am not really immersed into the design/w3c community too deeply (as you can tell). as for worrying about standards and width issues, my friend is an open source/linux nut and so whenver i make a site i run it by him to make sure it works/looks right in anything he can throw at it. plus i still design all my sites to look good in 1024 if not 8x6... maybe ill move to divs now though if everyone else is so against tables.

--
horix
horix@wornpath.net

Boris Mann _Old Blogger.com Account_’s picture

I am running a table-less theme using CSS (click on my name at the bottom for my website). I hacked the Trip theme, changed everything into DIVs with id's, and created my CSS file.

There are some visual problems when submitting / editing items, mainly because there are many places where tables are hardcoded, especially the book.module. I've already submitted a bug about hardcoded tables -- if you find other places/modules where this is the case, submit your own bug.

In any case, I would love to see the next version of Drupal have both a tables-based and table-less theme, with only CSS used for presentation. More complex layouts might mean editing a theme, but there is no reason that CSS by itself can't be used to do all the look-and-feel.

--
Boris Mann

moshe weitzman’s picture

A new theme called xtemplate is included in CVS Drupal. This theme is based upon Bluemarine and Ax themes. XTemplate is fairly new, so your feedback on how to make it better is welcome.