File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes HTML, CSS and JavaScript and the fly likes div layout problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "div layout problem" Watch "div layout problem" New topic

div layout problem

Jim Harrison
Ranch Hand

Joined: Mar 16, 2007
Posts: 30

I have the following layout

The following is the CSS for the ID elements:

When the user clicks a button in the rightside_div, I have the following javascript execute:

that covers all the left/right side divs and shows the slideshow_div. In Firefox 3.0+, this all works great. However IE 7 only covers the rightside_div and expands over to the right.

I've tried _top: -300px; and that doesn't shift the slideshow_div left.

How can I change my layout to have the desired effect of the slideshow covering both the left/right sides after the user clicks that button?


Ankit Garg

Joined: Aug 03, 2008
Posts: 9466

I'm not sure what you are trying to achieve here, but consider using position:absolute for our slideshow_div...

SCJP 6 | SCWCD 5 | Javaranch SCJP FAQ | SCWCD Links
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63873

I'm also not sure what desired behavior is being described, but I generally avoid absolute positioning as it usually introduces more problems than it solves.

[Asking smart questions] [About Bear] [Books by Bear]
Cloudgen C.F. Wong

Joined: Jul 15, 2009
Posts: 19
If you want to cover both the leftside_div and rightside_div by the slideshow_div, is it simplier for you hide both and leftside_div and rightside_div?

I agree. Here's the link:
subject: div layout problem
It's not a secret anymore!