| | |
overlapping divs
Please support our HTML and CSS advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
You must render the div you want on top last. This means that the div to be on top must be inside the other div in the HTML file.
HTML is not normally supposed to place objects on top of each other. Objects are normally supposed to have their own places on the page without overlap.
HTML is not normally supposed to place objects on top of each other. Objects are normally supposed to have their own places on the page without overlap.
Daylight-saving time uses more gasoline
By default, elements that are formatted later in an HTML document are stacked on top of earlier elements. In addition, elements placed with CSS positioning are stacked on top of elements that are not. To specify a different stacking order, use the style
z-index: value
where value is a positive or negative integer, or the keyword "auto". Objects are stacked based on their z-index values, with the highest z-index values placed on top.
The z-index style only works for elements that are placed with absolute positioning. Also, an element's z-index value determines its position relative only to other elements that share a common parent.
So a container div enveloping the other two divs is required.
I hope that helps...stacking objects can get tricky sometimes.
z-index: value
where value is a positive or negative integer, or the keyword "auto". Objects are stacked based on their z-index values, with the highest z-index values placed on top.
The z-index style only works for elements that are placed with absolute positioning. Also, an element's z-index value determines its position relative only to other elements that share a common parent.
So a container div enveloping the other two divs is required.
I hope that helps...stacking objects can get tricky sometimes.
![]() |
Similar Threads
- Display problem Font overlapping (Pascal and Delphi)
- Spacing problems in Ie Gettting extra spacing between divs (HTML and CSS)
- Need help with Random Divs code (PHP)
- Switching visible divs works in IE, not in FF or Opera (JavaScript / DHTML / AJAX)
- I need help with my website. Using Dreamweaver. (JavaScript / DHTML / AJAX)
- Error with tables overlapping (PHP)
- web design: tables versus divs (HTML and CSS)
Other Threads in the HTML and CSS Forum
- Previous Thread: empty space divs in IE
- Next Thread: How to switch layouts without affecting content
Views: 10776 | Replies: 8
| Thread Tools | Search this Thread |
Tag cloud for HTML and CSS
2002 appointments asp background backgroundcolor beta browser bug calendar cart center cgi code codeinjection corporateidentity create css deleted design development displayimageinsteadofflash dreamweaver drupal emailmarketing epilepsy explorer firefox flash font fonts form format free frontpage google griefers hackers hitcounter hover html ide ie7 ie8 iframe image images internet internetexplorer intranet iphone javascript jpeg layout macbook maps marketshare microsoft missing mozilla multimedia navigationbars news offshoreoutsourcingcompany opacity opera optimization perl pnginie6 positioning problem scroll seo shopping studio swf swf. templates textcolor theme timecolor titletags url urlseparatedwords visual visualization web webdevelopment webform website windows7 wordpress xml xsl






