Forum OpenACS Development: Problems with the new CSS based site header in head

CSS is a tricky beast to make work and look properly across different browsers, again proven here.

First, my mozilla browser (on linux) didn't render the site header properly at all - it was as if there was no css at all. the files check out ok and after about a dozen reloads and window switches, it all worked...

Second, because baseline alignment doesn't work across divs, the alignment of the various divs within #site-header depends on font sizes. On my browser, the server name stuck out too low and the other text flushed to the top. No amount of vertical-align prodding could fix it, and the only solution was to add a 4px padding-top to #site-header and a margin-top of -4px to .system-name.

The same problem appears on Safari on the Mac, except to fix it there you need a margin-top of -1px;

Even bigger problems are in Explorer for the Mac, which renders it all vertically instead of horix]zontally. I know that Mac IE is deprecated, but it still ships, and people will use it for a long time so I think that something as core as the site-header (that appears on every page) should work in it.

There is also a simple bug, that #context-bar needs a clear:both; to flush left.

So given these issues, unless they can be resolved I don't think we have a lot of option but return to a table.

Comments anyone?

Collapse
Posted by Torben Brosten on
Mark,

I haven't had a chance to examine openacs5.x's css yet, so cannot comment directly.

Cross-browser, multi-column css formating should be possible, much depends on whether the style assumes fixed positions or flexible (releative to window size).

I'm working on a flexible generic multicolumn style for another site, and will make suggestions once I have something tested (on macs etc.).

Mark, how does the "corners and borders"[1] and 3column flexible style[2] below work for your browsers?

They worked for the MacOS X and 9.1, NN and IE I have access to.

Torben

1. http://www.redmelon.net/tstme/4corners
2. http://www.redmelon.net/tstme/3cols2/

Collapse
Posted by Jon Griffin on
I am also using CSS for layout, tables are for tabular data not layout and CSS should be used.
Check http://salsablanca.com it is a 3 column css only layout. To be honest it is a commercial site and I am not that worried that every browser works, but it should degrade successfully.
Also, I have css versions of ad_form etc at
http://jongriffin.com/static/openacs/css-only/
Collapse
Posted by Mark Aufflick on
Torben,

that is the cleanest example of corner code i have ever seen - no hacks at all.

The column code is nearly hack free - again the best i have seen.

But these are fairly simple div manipulation examples the problems i have observed (except for Mac IE) are not that they don't work, but that they don't look quite right - which for our main header is super important.

Maybe someone who is a better css whiz than me can unify it all, but I don't think we want to go down the css hacks road - even if every movable type blog thinks they are ok.

Collapse
Posted by Torben Brosten on
Mark, I agree that there are a lot of quirky css implementations out there. This is a great opportunity for openacs to be a flagship example of how css can be used --if we are up to the task.  =)