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?!?
If you don't have an account you can create one now.
HTML doesn't work in the subject.
More info about formatting

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

Expand Cut Tags

No cut tags

Profile

ibneko: (Default)
ibneko

Most Popular Tags

Style Credit

Page generated Jul. 4th, 2025 10:32 pm
Powered by Dreamwidth Studios
January 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 31 2021