This is Interesting: Free Magazines for Graphics designers and webmasters  


Home > Archive > Site Ratings & Reviews > July 2006 > Avoiding overlapping of <div> using CSS/script





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Avoiding overlapping of <div> using CSS/script
dinesh@nexthop.com

2006-07-10, 11:07 pm

Hi All,

I am trying to implement a web page with the help of three <div>
elements, which are not nested. My requirement is to retain one div in
the top of the page, one at the bottom of the page, and one at the
center of the page, irrespective of the web browser or resolution.

Also, I don't want them to overlap on each other when the window is
resized. Instead the window should be giving a scrollbar. Can someone
please help me out?

Regards,
Dinesh

Edelman

2006-07-10, 11:07 pm


dinesh@nexthop.com wrote:
> Hi All,
>
> I am trying to implement a web page with the help of three <div>
> elements, which are not nested. My requirement is to retain one div in
> the top of the page, one at the bottom of the page, and one at the
> center of the page, irrespective of the web browser or resolution.
>
> Also, I don't want them to overlap on each other when the window is
> resized. Instead the window should be giving a scrollbar. Can someone
> please help me out?
>
> Regards,
> Dinesh


what does your code look like? is it just (simplified):

<html>
<body>
<div id="div1"></div>
<div id="div1"></div>
<div id="div1"></div>
</body>
</html>

or is it more like

<html>
<body>
<div id="wrap">
<div id="div1"></div>
<div id="div1"></div>
<div id="div1"></div>
</div>
</body>
</html>

or something else?

what's around it, and we can help you fix it

wayne

2006-07-10, 11:07 pm

Edelman wrote:
> dinesh@nexthop.com wrote:
>
> what does your code look like? is it just (simplified):
>
> <html>
> <body>
> <div id="div1"></div>
> <div id="div1"></div>
> <div id="div1"></div>
> </body>
> </html>
>
> or is it more like
>
> <html>
> <body>
> <div id="wrap">
> <div id="div1"></div>
> <div id="div1"></div>
> <div id="div1"></div>
> </div>
> </body>
> </html>
>
> or something else?
>
> what's around it, and we can help you fix it
>

er, shouldn't the divs be?
<div id="div1"></div>
<div id="div2"></div>
<div id="div3"></div>

--
Wayne
http://www.glenmeadows.us
With or without religion, you would have good people doing good things
and evil people doing evil things. But for good people to do evil
things, that takes religion.
—Steven Weinberg
Edelman

2006-07-10, 11:07 pm

wayne wrote:
> er, shouldn't the divs be?
> <div id="div1"></div>
> <div id="div2"></div>
> <div id="div3"></div>


eh...yeah. stupid copy and paste doesn't autoincrement.

--
Jason Edelman
http://fixmysite.blogspot.com

Sponsored Links


Copyright 2003 - 2008 forum4designers.com  Software forum  Computer Hardware reviews