I’m putting together a small website for a class i’m teaching this semester. Right now, i’m trying to get the basic layout right using CSS, but it’s a pain in the ass. I admit i’m no CSS expert, but i understand the basic principles, and getting column layouts to work in CSS is really annoying. I’m almost ready to throw up my hand and go back to using tables. I could do this layout in tables in about 5 minutes.
Anyway, here’s the page:
The grey banner at the top is reserved for a image with course title. That’s no problem.
The left hand column with navigation etc. also looks fine to me. There with be a couple of gif logos there in the final version, making the column slightly longer.
I’ve used a hack to make sure the columns appear to be of equal length.
What’s really puzzling me right now is:
(a) why the page displays so fucked up in Internet Explorer 6.
(b) why, in Firefox 2.0.x, the Test Header, which should be centered in the second column, is offset to the right.
(c) why it displays perfectly in Opera 9.24.
I have a feeling that (a) and (b) are related, and fixing one will probably fix the other. And obviously there’s a browser compatibility issue i’ve missed here.
There’s a further issue, also. I did have a layout that works fine in all three browsers:
but i changed it because i wanted #col2 to be position:relative rather than float:left. I need the position attribute so i can use position:absolute within column 2. Does that make sense? Anyway, it appears that adding position:relative to #col2, and removing float:left from #columns was what caused my problem.
Anyway, if anyone can help me with this, i’d be most appreciative.
(You can ignore the javascript in the header; that’s just for the rollover images i’ll be using in the top banner.)