?

Log in

No account? Create an account
aaaaaaaaagggh (but a good aaaaaaagh) - Baxil [bakh-HEEL'], n. My Sites [Tomorrowlands] [The TTU Wiki] [Photos]
View My LJ [By Tag]


May 23rd, 2004
02:54 am
[User Picture]

[Link]

Previous Entry Share Next Entry
aaaaaaaaagggh (but a good aaaaaaagh)
Dear gods. The CSS solution I've been seeking for the new Tomorrowlands layout for WEEKS now ... and it even seems to work on every major browser the same way! No more crazy futzing around with multiple style sheets for different browsers (I hope)!

http://www.ryanbrill.com/floats.htm

Why don't they document this shit? Anywhere?

For some reason, the best way to get a fixed-width sidebar that doesn't break on at least one common browser (*cough* IE) is to use negative margins and floats. Strangely, positive margins break things in some browsers but negative margins don't!

Why? Negative margins allow overlap into that element's space. And I'm damned if I know why that solves the problem, but it seems to, and hopefully I can fix all my style woes this way, since horizontal positioning and margins are pretty much the only major issues I've got.

I ... just ... can't ... believe ... it's ... that ... simple. But I bloody well hope it is. It's been three weeks since the launch and my site still looks badly broken in half the browsers I test it in.

Props to the cssDiscuss wiki, the most awesome CSS reference ever. I spent an hour today RTFMing and the wiki still helped me more, and more quickly.

Current Mood: surpriseddisbelief
Current Music: Spinning Glass, "Deeper Sleep"
Tags:

(9 comments | Leave a comment)

Comments
 
From:independence161
Date:May 23rd, 2004 06:47 am (UTC)
(Link)
I recently spoke to someone else who was having grief with Internet Explorer and web standards.

Internet Explorer is an archaic browser that isn't due for another major update until Windows Longhorn is released about two years from now. Meanwhile, as the uninformed mass of computer users continue to use Microshaft Internet Exploder, web standards go to hell. The next version of MSIE won't be compatible with earlier versions of Windows, including XP.

I'd love to see alternate browsers like Mozilla (my current browser), Opera, or another browser not based on MSIE gain more ground. Modern Gecko and KHTML based browsers comply with standards. MSIE continues to lag behind the rest of the pack in terms of standards compliance. Unfortunately, it has a far greater share of the market than any other browser.
[User Picture]
From:baxil
Date:May 23rd, 2004 04:14 pm (UTC)
(Link)
For a while, many years ago, I went through an "IE is the Antichrist" phase. My attitude toward it gradually softened due to its primary competition at the time being Netscape 4, which admittedly was a more frustrating and bloated product. (Many were the strangled cries of annoyance when a page would finish loading and the designer had innocently forgotten to close a <table> tag -- and nothing from that point on would display.)

Then a crop of new browsers sprung up, and I was sort of apathetic on the whole browser wars thing; "Yeah, they're better, but whatever."

Now that I'm getting into HTML/CSS coding that relies on actual standards, I am again realizing what a hideous monster IE is. Hideous, horrible, useless thing.

Did I mention that somehow my install of IE 5 on my work machine not only has a broken "View Source" (completely fails to do anything no matter what workarounds I use!) but also won't recognize .JPGs (displays them on screen, but a right-click "save as" only gives me the option to save them as .BMPs)?

Hideous, ugly, disgusting, unholy thing. The only reason I give it the time of day is that I don't feel I should penalize its users; sometimes people don't have much of a choice as to which browser they have access to. (Like ... oh ... me at work!)
From:kiala
Date:May 23rd, 2004 12:50 pm (UTC)
(Link)
ALLL browsers?

What about Lynx? ;>
[User Picture]
From:baxil
Date:May 23rd, 2004 03:52 pm (UTC)
(Link)
Nyeah, nyeah. I never said all browsers, not once anywhere in the post. ;>

But, actually, the listed solution is Lynx-friendly too, because it allows you to place the sidebar after the content in the source despite the sidebar being on the left. So you don't have to page through lots of site navigation crap to get to the new stuff.
[User Picture]
From:taral
Date:May 23rd, 2004 02:00 pm (UTC)
(Link)
I use CSS to do the grid layout on my friends page. And it drives me up the wall. I've come to this conclusion:

If you want grid layout, USE TABLES. Don't shoehorn floats into the wrong place, you're just asking for trouble.
[User Picture]
From:baxil
Date:May 23rd, 2004 04:05 pm (UTC)
(Link)
In my web wanderings, I've come to the conclusion that geeks are pretty much evenly divided into the "CSS is broken, stay old-school" camp and the "CSS works, and tables for layout was lame in the first place" camp. About the only thing they agree on is that mixing CSS layout and table layout is Frankensteinian, and a generally speedy route to browser doom.

I'm trying to chuck all of those positions aside in favor of pragmatism, but half the point of this style shuffling was to get me to bite the bullet and learn CSS, and now that I'm seeing that useful solutions do seem to exist, I'll give them a shot. If the negative-margin trick doesn't work, though, it's back to the table salt mines. (And if you view source on Tlands right now, you'll notice I am wimping out and using tables for the individual post formatting -- but I'm trying to fix that, too.)

Thanks for the advice, though.
[User Picture]
From:taral
Date:May 24th, 2004 11:55 am (UTC)
(Link)
See, it works for simple grid layouts. Like I said, I used it for my friends page. But it gets progressively more and more impossible to maintain as the grid gets more complex. Try doing 3 columns. Now try 4. The problem is that people see <TABLE> as a table-layout system, and I now understand that <TABLE> is for any and all grid-layout.
From:premchai21
Date:May 24th, 2004 09:32 pm (UTC)
(Link)

I'd kind of like to see TeX-style boxes and arbitrary XML plus transformation specifications (perhaps some kind of XSLT?)...

<page><page-title>This is a Website</page-title><navigation><nav-element href="other-page.fooxml">Navigation element</nav-element></navigation><content><entry><entry-date>20040525122200Z</entry-date><entry-title>An entry</entry-title><entry-text>Blah blah blah. Foo bar baz qux. Lorem ipsum dolor sit amet blah blah blah.</entry-text></entry></content></page>

<vbox style="background: black; color: white; font-family: serif" width="100%"><hbox style="background: red; color: black; font-size: 225%">This is a Website</hbox><hbox><vbox height="100%"><parbox><a href="other-page.fooxml">Navigation element</a></parbox></vbox><vbox><vbox><hbox><hbox style="color: yellow; font-size: 150%">An entry</hbox><hfil/><hbox style="color: cyan; font-size: 100%">2004-May-25 12:22 GMT</hbox></hbox><parbox>Blah blah blah. Foo bar baz qux. Lorem ipsum dolor sit amet blah blah blah.</parbox></vbox></vbox></hbox></vbox>

[User Picture]
From:taral
Date:May 25th, 2004 02:23 pm (UTC)
(Link)
Lovely. The question is how to make web browsers do what we want. :)
Tomorrowlands Powered by LiveJournal.com