PDA

View Full Version : My divs have a mind of their own


Kraetos
2007-01-27, 17:42
Can someone please explain to me why my footer divs have a tendency to magically relocate themselves to the top and above (in terms of z-index) the preceeding div?

The Hard Six (http://www.thehardsix.com)

Note that you can't click the permalink. If you crack open CSSEdit, you will notice that the culprit is the footer div, which has positioned itself right on the top of the content div, despite being outside that div in the DOM tree. To make things even stranger, the content in the footer is actually where it should be!

I am having a similar problem with a site I am currently working on.

Salmagundi (http://www.thehardsix.com/salmagundi/)

Note that, once again, despite the footer div being outside the content div, the footer div floats right up.

Why don't they stay put!?! This is driving me nucking futs.

If anyone knows what is going on, I would be extremely appreciative.

drewprops
2007-01-27, 18:33
Let's see, the DIV with the ID "wrap" is the one immediately above the DIV with the ID of "footer" and (in my browser) the DIV with the ID of "footer" is visually below the content that precedes it in your code. Have you changed it after posting here maybe? Check the timestamp of my post....

Kraetos
2007-01-27, 18:46
Let's see, the DIV with the ID "wrap" is the one immediately above the DIV with the ID of "footer" and (in my browser) the DIV with the ID of "footer" is visually below the content that precedes it in your code. Have you changed it after posting here maybe? Check the timestamp of my post....

Visually, yes. But if you mouse over (most) of the permalink, its unclickable. If you open a program which lets see the location of divs such as CSSEdit, you will notice that the footer div is actually on top of the wrap div.

Kraetos
2007-01-27, 19:06
Ah! I got it. I wasn't clearing my floats, so my divs were stacking on top of each other. Rookie mistake.

drewprops
2007-01-27, 19:16
Wait... CSSEdit lets me see my page with its DIVs?? Is that the new version they just released or the previous version (that I still have because I haven't upgraded yet)?? Dang!!

drewprops
2007-01-27, 19:20
Update, just tried it. Dang!

Kraetos
2007-01-27, 19:46
Update, just tried it. Dang!

Sexy, aint it? And without it, I would NEVER have figured that out. Not in a million years.

drewprops
2007-01-27, 21:34
Oh, in a million years I think you'd have solved it and gone on to come up with a solution to all the problems with Internet Explorer 56 during the android invasion of the Omaha Riviera. ;)

Brad
2007-01-27, 22:24
For what it's worth, one of the only reasons I keep Firefox on my computer is for using the Firebug (http://www.getfirebug.com/) extension to debug layout issues like this.

http://www.getfirebug.com/html1.gif

drewprops
2007-01-27, 22:58
Hate to say it but I'm using FireFox more and more and more.... the add-ons are kind of spiffy. Still love Shiira, but FireFox is growing on me. Thanks for reminding me of this extension!

Kraetos
2007-01-28, 23:18
For what it's worth, one of the only reasons I keep Firefox on my computer is for using the Firebug (http://www.getfirebug.com/) extension to debug layout issues like this.

http://www.getfirebug.com/html1.gif

Yeah. Trust me, I've considered using Firefox purely for the sake of Firebug but the interface (fucking widgets) kills me. And Safari just handles text and fonts SO much better.

Normally, CSSEdit is fine for debugging issues. But next time I fuck up like this I'll probably cave and use Firebug.

(Isn't Firefox 3 going to be a massive overhaul and achieve near-cocoaness?)

EDIT: Bajeezus, thats ridiculously helpful. The ability to see whats been inherited and what is overridden is EXTREMELY useful. Thanks Brad! :)

ast3r3x
2007-01-29, 08:03
If you develop websites, and don't use the Web Developer extension for FireFox, you are just hurting yourself. I prefer Shiira to browse the internet, but FireFox is really an amazing web dev tool.

Brad
2007-01-29, 08:08
Yeah, even I can begrudgingly admit to using Firefox to test code.

That certainly does not mean that I use it for my regular, casual browsing habits, though. *shudder* If there was any comparable alternative to Firebug for other browsers, I'd switch in a heartbeat.

Kraetos
2007-01-29, 19:10
WebDev Tools + Firebug are very helpful. Thanks guys, I can't believe I wasn't using them before.

It's really too bad that Firefox is so damn ugly... otherwise I would be all over it.