ibneko: (Default)
[personal profile] ibneko
In my attempts to convert the Engineering Council website (http://ec.uiuc.edu) from coldfusion to PHP, I've also taken it upon myself to not use tables, and convert it over to pure CSS.

This, I find, is somewhat of a pain in the ass. While tables are clunky, and tend to uglify code, CSS isn't implemented in the same way for all browsers.

And that annoys me. Only ONE browser, out of the five I keep on my laptop, handles the div the way I want it to.

Here's what I'm trying to do:
See the rather ugly peach-colored navigation bar at the left? And how there's that extending empty chunk at the bottom (it extends, trust me; just try the program/events link.), 'cause it's based on a table, and that's the result of the table row-height extending?

I can't replicate that with CSS. I'm pretty sure I'm doing it right, but it only displays perfectly in OmniWeb, of ALL THINGS. Opera probably handles it correctly, but I have a bug elsewhere that's causing it to offshift a bit too far upwards.

Here's how I'm doing it:
<div class="main-area-wrapper">
<div class="left-filler">
 
</div>
<div class="main">
<?php include "main.php"; ?>
</div>
</div>


CSS code:

.main-area-wrapper {
/* Dummy wrap */
}
.left-filler{
margin: 1px;
width: 160px;
height: 100%;
background-color: #ffcc99;
}
.main {
position: absolute;
left: 0px;
top: 71px;
width: 575px;
margin-left: 170px;
}


Essentially, the idea here is that, due to the fact that stuff is wrapped in the main-area-wrapper, this will expand as far as there is text, thereby stretching the left-filler so that it matches the height of the main content area.

However, most browsers read the height:100% in the left-filler incorrectly, and stretch that to 100% of the browser window, which I DON'T want. XP

====
So I have two options. Keep poking around to see if there's some sort of CSS hack to work this out, code up a javascript hack to calculate the size of the text, and insert that in, or use the faux columns method (where you have a vertically repeating background).

None of those methods are particularly appealing... Why the fuck can't things be implemented correctly?!?
From:
Anonymous
OpenID
Identity URL: 
User
Account name:
Password:
If you don't have an account you can create one now.
Subject:
HTML doesn't work in the subject.

Message:

If you are unable to use this captcha for any reason, please contact us by email at support@dreamwidth.org


 
Notice: This account is set to log the IP addresses of everyone who comments.
Links will be displayed as unclickable URLs to help prevent spam.

Expand Cut Tags

No cut tags

Profile

ibneko: (Default)
ibneko

Most Popular Tags

Style Credit

Page generated Oct. 19th, 2017 05:27 am
Powered by Dreamwidth Studios
November 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 2016