CSS - Overlap Where Div Ends And Table Begins
I am intergating my forum software into my main page. I have created a 100% non-table front page, but there is one table that is stuck at the bottom of the page by the forum software.
So my DIV tag ends and a TABLE begins and they overlap. I placed a clear:both DIV tag after my last DIV tag, but that didn't seem to help. I don't think I can convert the TABLE to DIV since it's part of the software. I was just thinking of adding a height:20px to my "clearit" DIV to pad the bottom enough to push the table down but that seems hokey. Similar TutorialsI have a css layout I'm working, that is all divs (my first time doing this without tables). My page consists of all divs, and then the body is a table for displaying date from a database. My problem is that I have the footer positioned absolutely at the bottom of the page, which is what I want, EXCEPT when the table extends longer and the user needs to scroll down. If the table does not extend the full height of the screen, then I want the footer at the bottom of the screen, but if the table extends past the bottom of the screen, I need to footer to be at the end of the table. I hope that makes sense. CSS Tags -- Just a portion of them: Code: body { margin: 0px 0px 0px 0px; background-color: #E7F1FD; font-family: Tahoma, Verdana, Arial, sans-serif; height: 100%; } /*This is the main body of the page and contains the db data*/ #pwdb_body { background-color: #E7F1FD; border: 2px solid #FFF; width: 100%; height: 100%; position: absolute; top: 165px; } /*Footer */ #left_footer { background-image:url(images/bar_header2.jpg); width:100%; height:36px; position:absolute; bottom: 0px; } My DIVS (partial): Code: <!-- START BODY --> <div id="pwdb_body"> <table width=100% border=1 name="main_body" bordercolor="#000000" style="border-collapse: collapse;" cellspacing=0 cellpadding=1> <tr> <td>...table data...</td> </tr> </table> </div> <div id="left_footer"><img src="images/index_02.gif"/></div> I have attached a screenshot of what I'm talking about. The footer bar is highlighted in a red box, and the table bottom is pointed out by a red arrow. Hello, I am working with something like this: Code: <div>content one here</div> <table><tr><td>content two here</td></tr></table> How can I get the div to overlap the table and appear on top of it? Thanks! Hi! I'm using hte CSS's float for the image. This allow the big image to float over the small table. It look good in Gecko browser but in IE, the bottom image get chopped off, right where the last row of the table end. Why is that? Is there a workaround to it? --snip-- <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> <title>E-Market Online</title> </head> <body> <style type="text/css"> a:link { BACKGROUND: none transparent scroll repeat 0% 0%; COLOR: #0000FF; TEXT-DECORATION: none } a:active { COLOR: #0000FF; TEXT-DECORATION: none } a:visited { BACKGROUND: none transparent scroll repeat 0% 0%; COLOR: #0000FF; TEXT-DECORATION: none } a:hover { BACKGROUND: none transparent scroll repeat 0% 0%; COLOR: #18208c; TEXT-DECORATION: underline } body { MARGIN: 0px; BACKGROUND-COLOR: #83878C; } form { MARGIN: 0px; } table { BORDER-COLLAPSE: collapse; } a.wto_link1:link { FONT-FAMILY: Tahoma; FONT-SIZE: 10px; FONT-WEIGHT: bold; COLOR: #AD0044; TEXT-DECORATION: underline; } a.wto_link1:active { FONT-FAMILY: Tahoma; FONT-SIZE: 10px; FONT-WEIGHT: bold; COLOR: #AD0044; TEXT-DECORATION: underline; } a.wto_link1:visited { FONT-FAMILY: Tahoma; FONT-SIZE: 10px; FONT-WEIGHT: bold; COLOR: #AD0044; TEXT-DECORATION: underline; } a.wto_link1:hover { FONT-FAMILY: Tahoma; FONT-SIZE: 10px; FONT-WEIGHT: bold; COLOR: #18208c; TEXT-DECORATION: underline; } a.wto_no_link1:link { FONT-FAMILY: Tahoma; FONT-SIZE: 10px; FONT-WEIGHT: bold; COLOR: #AD0044; TEXT-DECORATION: underline; CURSOR: text !important; } a.wto_no_link1:active { FONT-FAMILY: Tahoma; FONT-SIZE: 10px; FONT-WEIGHT: bold; COLOR: #AD0044; TEXT-DECORATION: underline; CURSOR: text !important; } a.wto_no_link1:visited { FONT-FAMILY: Tahoma; FONT-SIZE: 10px; FONT-WEIGHT: bold; COLOR: #AD0044; TEXT-DECORATION: underline; CURSOR: text !important; } a.wto_no_link1:hover { FONT-FAMILY: Tahoma; FONT-SIZE: 10px; FONT-WEIGHT: bold; COLOR: #AD0044; TEXT-DECORATION: underline; CURSOR: text !important; } .faq_color1 { COLOR: #18208C; FONT-WEIGHT: bold; } .img_float3 { FLOAT: left; MARGIN: 0px 0px -250px 400px; } .wto_txt1 { FONT-FAMILY: Tahoma; FONT-SIZE: 10px; FONT-WEIGHT: normal; COLOR: #55575B; TEXT-DECORATION: none; } </style> <table border="0" cellpadding="0" cellspacing="0" width="761" height="100%" align="center"> <tr> <td width="1" bgcolor="#000000"><img src="images/layout_spacer1.gif" width="1" height="1"></td> <td align="center" valign="top" width="760" bgcolor="#FFFFFF"> <!-- inside table anchor --> <table border="0" cellpadding="0" cellspacing="0" width="760" align="center"> <tr> <td width="24"> </td> <td align="left" valign="top" width="712"> <img src="http://i.a.cnn.net/cnn/2004/ALLPOLITICS/09/30/debate.main/top.2110.split.pool.jpg" width="280" height="210" class="img_float3"> <table border="0" cellpadding="0" cellspacing="0" width="712"> <tr> <td align="left" valign="top" width="12"> <img src="images/arrow.jpg" width="9" height="9" vspace="6" align="top"> </td> <td width="4"> </td> <td align="left" valign="top" width="696"> <a href="#" class="wto_no_link1">F.A.Q.</a> </td> </tr> <tr> <td colspan="2"> </td> <td align="left" valign="top"> <table border="0" cellpadding="0" cellspacing="0" width="696" align="left" valign="top"> <tr> <td align="left" valign="top" class="wto_txt1" width="55"> <span class="faq_color1">Question:</span> </td> <td align="left" valign="top" class="wto_txt1" width="641"> Once my business send in all the paperworks, how soon can I start using<br> the whatever? </td> </tr> <tr> <td align="left" valign="top" class="wto_txt1"> <span class="faq_color1">Answer:</span> </td> <td align="left" valign="top" class="wto_txt1"> Once your business is issued an account number and password. </td> </tr> <tr><td colspan="2"><img src="images/spreadsheet_spacer1.gif" width="1" height="10"></td></tr> <tr> <td align="left" valign="top" class="wto_txt1"> <span class="faq_color1">Question:</span> </td> <td align="left" valign="top" class="wto_txt1"> How can I be sure the transmission of data is secure with your website? </td> </tr> <tr> <td align="left" valign="top" class="wto_txt1"> <span class="faq_color1">Answer:</span> </td> <td align="left" valign="top" class="wto_txt1"> The e-Market website encrypts all the data using 128 bit Secure Sockets<br> Layer technology. End users can decrypt the information using 128 bit<br> from the web browser. </td> </tr> </table> </td> </tr> </table> </td> <td width="24"> </td> </tr> </table> <!-- inside table anchor --> </td> </tr> </table> </body> </html> --snip-- Thanks.. FletchSOD I have a site construced of divs run off css. If I have a lot of content, Firefox will cut off the div at a certain point stopping the text and background color from displaying. IE looks fine. I don't have height set up. Does anyone know of this bug and how to stop it? I'm not finding an answer through google. Hi Guys, I'm sure that it's something simple but on my new site the white box containing the logo and menu ought to cover include the thumbnails too. I have the div tag close after the divs containing the thumbnails, but i need to somehow have those thumbs part of the 'content' div. Here is the html: Code: <body> <!--Center Content Column--> <div class="content"> <center> <!--Logo--> <img src="logo.jpg" alt="HeldTogether Logo" name="logo" width="450" height="250" class="logo" id="logo" /> <br /> <!------> <!--Navigation bar--> <div class="nav"> <img src="left.jpg" width="24" height="40" /> <a href="#" onmouseout="MM_swapImgRestore()"onmouseover="MM_swapImage('Portfolio','','portfolio_over.jpg',1)" > <img src="portfolio.jpg" alt="Portfolio" name="Portfolio" width="105" height="40" border="0" id="Portfolio" /></a> <a href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Contact','','contact_over.jpg',1)" > <img src="contact.jpg" alt="Contact" name="Contact" width="100" height="40" border="0" id="Contact" /></a> <img src="right.jpg" width="221" height="40" /> </div> <br /> <!-----> <!--Thumnails--> <div class="float"> <img src="images/fire_escape_thumb.jpg" width="100" height="100" alt="Fire Escape" /><br /> <p>Fire Escape</p> </div> <div class="float"> <img src="images/leaning_man_thumb.jpg" width="100" height="100" alt="Leaning Man" /><br /> <p>Leaning Man </p> </div> <!--- etc etc etc --> <!-----> </center> </div> </body> And the CSS: Code: body { background-color:#808E8F; margin-top:0px; padding-top:0px; font-family:Arial, Helvetica, sans-serif; } img{ padding:0px; margin:0px; } img.logo { padding: 6px; } div.content { background-color:#FFFFFF; margin-left:9%; margin-right:9%; padding: 5px; padding-top:10px; } .nav { height:40px; width:450px; padding:0px; margin:0px; padding-left:6px; padding-right:6px; } div.float { padding:7px; float:left; } div.float p { text-align:center; } Any thoughts would be appreciated. Gday CSS PPL, Im still yet to test on other browers, but im using IE 6.0 while the explorer is full screen the width of my div is 100% But when i resize the browser on the horizontal untill a horizontal scroll bar appear, and scroll to the right, the div cuts off where the scrolling begins, div.banner { background-image: url(../images/banner_repeat.gif); width:100%; height:163px; text-align:center; } and yeah, the background image 'banner_repeat' stops repeating at that point. any help would be great, Thx in advance, James I posted something the other day, but that thread was elaborate but not helpful at all, because it missed a useful example with CSS sheet and everything. So here's another attempt and hopefully people know where the problem resides. I've stripped down the following page as far as I could within limited time. Before you click and open this URL, I think it's best to read my introduction first, because the problem often only occurs the first time after opening IE5.5 or IE6.0. With IE6.0 it might be that it _does_ work for you now. I notice that the bug is very infrequent with IE6.0. Sometimes it feels like IE6.0 cached the right page and doesn't want to show the wrong page the first time anymore. With IE5.5 it's still consistent on first time though... it will show the bug! A refresh may fix the page. Which is basically like opening the page a second time. http://www.stack.nl/~rem/problem.html It's a page with 3 big sections: header, middle, footer. I've stripped the footer as far as possible and reduced the header. The footer stays at the bottom of the window/viewport or bottom of the page if the page is longer and requires scrolling. What problem to look for? The news section to the right, it should have 2 identical blocks (in this example). But it cuts off the second block entirely and cuts the end of the first one. Basically where the form ends on the left side. On reload of the page the error will be "fixed". By accident I stumbled upon this thread (<- link) where they also seem to discuss the cut off of contents when the regular body text is shorter than the float text. Though for me the problem only appears on the page with the form and not with other pages. They couldn't figure out the trigger or cause either and the thread stopped in 2002. I'm trying that <p></p><p></p> workaround... If anybody knows some other workarounds or knows what triggers this problem. Feel free and invited to post any suggestion that can solve this matter. Adding more contents text is no option alas. I need this menu to be halfway on the content section, however it keeps getting pushed around. I can't figure out what to change for positioning to move it over! Help HTML: Code: <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <link rel="stylesheet" type="text/css" href="layout.css"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Untitled Document</title> </head> <body> <div id="wrapper"> <div id="main"> <p>Insert Content Here</p> <p>Insert Content Here</p> <p>Insert Content Here</p> <p>Insert Content Here</p> <p>Insert Content Here</p> <p>Insert Content Here</p> <p>Insert Content Here</p> <p>Insert Content Here</p> <div id="nav"> <ul> <li><a href="#">Home</a></li> <li><a href="#">Products</a></li> <li><a href="#">About</a></li> <li><a href="#">Gallery</a></li> <li><a href="#">Contact Us</a></li> </ul> </div> <!--Close #nav--> </div> <!--Close #main--> <!--Close #wrapper--> </body> </html> CSS: Code: @charset "utf-8"; /* CSS Document */ body { background-color:#000; font-family: arial, helvetica, sans-serif; margin: 1em; } #wrapper { } #main { background-color:#FFF; width:80%; } <!--margin: 0em auto;--> #nav { float:left; margin-left:-7em; margin-top:0; } #nav ul { list-style-type:none; } #nav a { display: block; color: green; background-color: navy; width: 5em; padding: .2em .5em; text-decoration: none; font-size: 1.25em; } #nav a:hover { background-color: blue; color: dark green; } How do I get it to overlap and to get the text/images to wrap around the nav menu? Hi I have this page http://www.networkhealthgroup.co.uk/new/jobs.htm I have put borders around the columns, when viewed in IE you will see that the main content div overlaps the right column. You will also see that the right border is looks alot more than 140px wide in IE than it does in Firefox!!! Does anyone know what I am doing wrong here? I have a project that someone else coded in the first place and I am trying to make some fixes on it. I have tried a ton of things but do not know exactly what is wrong with the layout. If you visit musaferthefilm.com/test/index2.html you can see the layout and how the navigation spans past the rest of the container. I am not sure if this is very complex to fix but I have tried everything. I appreciate your help! Thank you. Hello! I have a flash header and I'm wondering how to make an img (jpg/png) overlap a flash header? It seems that the flash keeps covering my img when i use positionsomething) Thanks! Greets, I'm having trouble with the menu not being properly shown in IE. The list is supposed to pass over the central DIV, and... the bugger seems to want to stay in the background for some reason. I set that div's z-index well above the others, set the visibility to visible... I'm stumped. teh linkification Thanks for taking the time to read my question. I have a horizontal UL for a nav bar. It works great, and positions well in IE, but in FF the ContentBox moves too far up, and overlaps with my nav bar. I can't figure out why. I added an extra div and placed the nav bar in that, but that didn't help either. What am I doing wrong. Also, I have my widths set to 100% IE has no horizontal scroll bar at the bottom, but FF does. Not sure what is going on here either. thanks again for your help. Brad HTML: Code: body { background-color: #48494D; padding: 0px; margin: 0px; } #Head1 { background-color: #000000; width: 100%; height: 100px; padding-left: 20px; } #Head2 { background-color: #ffffff; width: 100%; height: 45px; border-bottom: solid #CCCC99 2px; padding-left: 130px; } #MainNav { width: 100%; height: 20px; background-color: transparent; } #navcontainer ul { padding-left: 25px; margin-left: 0; background-color: transparent; color: #CCCC99; float: left; width: 100%; font-family: arial, helvetica, sans-serif; } #navcontainer ul li { display: inline; } #navcontainer ul li a { /*padding: 0.2em 1em 0em 0em;*/ background-color: transparent; color: #CCCC99; text-decoration: none; text-align: center; float: left; border-right: 1px solid #CCCC99; width: 134px; font-size:12px; border-bottom: 4px solid #48494D; } #navcontainer ul li a:hover { border-bottom: 4px solid #CCCC99; text-align: center; } #navcontainer ul li.LastOne a { border: 0 none; } #navcontainer ul li.LastOne a:hover{ border-bottom: 4px solid #CCCC99; } #ContentBox { width: 800px; height: 400px; margin: 0px auto; background-color: aqua; display: block: } #CBHeader1 { background-image:url(SecondHeaderImg.jpg); height: 50px; width: 800px; } CSS: Code: body { background-color: #48494D; padding: 0px; margin: 0px; } #Head1 { background-color: #000000; width: 100%; height: 100px; padding-left: 20px; } #Head2 { background-color: #ffffff; width: 100%; height: 45px; border-bottom: solid #CCCC99 2px; padding-left: 130px; } #MainNav { width: 100%; height: 20px; background-color: transparent; } #navcontainer ul { padding-left: 25px; margin-left: 0; background-color: transparent; color: #CCCC99; float: left; width: 100%; font-family: arial, helvetica, sans-serif; } #navcontainer ul li { display: inline; } #navcontainer ul li a { /*padding: 0.2em 1em 0em 0em;*/ background-color: transparent; color: #CCCC99; text-decoration: none; text-align: center; float: left; border-right: 1px solid #CCCC99; width: 134px; font-size:12px; border-bottom: 4px solid #48494D; } #navcontainer ul li a:hover { border-bottom: 4px solid #CCCC99; text-align: center; } #navcontainer ul li.LastOne a { border: 0 none; } #navcontainer ul li.LastOne a:hover{ border-bottom: 4px solid #CCCC99; } #ContentBox { width: 800px; height: 400px; margin: 0px auto; background-color: aqua; display: block: } #CBHeader1 { background-image:url(SecondHeaderImg.jpg); height: 50px; width: 800px; } Hey guys, It might be easiest if you see the example first: http://www.venusadvertising.com.au/ourwork.php See how the red tab overlaps the Flash element in Webkit browsers and under it in IE? I need the page to scroll rather than for the elements to overlap. CSS doc is he http://www.venusadvertising.com.au/_assets/css_venus.css Thanks for your help! Ham Hi, I would like to superimpose (overlap) one small image over the second larger one, to a left bottom corner of that larger. The thing is I do not know the width & height of larger image as it is loaded dinamicly with php. I tryied puting large image to table than position small image to div with style="position:relative; left:0px; bottom:0px; z-index:33;" not working, can you help? Hello, I have 3 Divs as follow: <div id="Container"> <div id="Header">header</div> <div id="Text">text</div> </div> I need the following: 1. Both "Header" and "Text" div's top left corner to be align at top left of "Container" div 2. "Text" div should be over "Header" div hiding it. How can I do this? Thanks, Miguel I have decided that it would be easier to make 2 seperate div tags so I wouldn't have to deal with the issues on margin and padding that IE barf all over at. So, what I'm going to do is to make the 2nd <div> to overlap the 1st <div>. So, what the property or attribute that I can use to make it the overlapping work that work for most web browsers?? Thanks, FletchSOD Hello all - I will be so grateful if someone can help me. I'm not sure why, but my right column is overlapping my footer. I have been working too long and my brain is dead! I cannot figure it out for the life of me. Can someone please tell me what I did wrong? I am trying to have the header, 3 columns, left-fixed, right-fixed, center fluid. I want the footer to span all 3 along the bottom, which it is doing. But the right column is overlapping. Code: #header {background: #ffffff; height: 120px; margin: 0; padding: 0} #content {margin: 0} #wrap {min-width:770px;margin: auto;position:relative} #main #content-wrap {position:relative;width:100%} #main #content {margin: 0 235px auto 175px} #content-wrap {position:relative;width:100%} #leftnav {position:absolute;top:0;left:0px;width:150px} #sidebar {position:absolute;top:0;right:5px;width:200px;} #footer {positon:relative; background-image: url(../imag /bottom.jpg); background-repeat: repeat-x;} With the structure as such: Code: <body id="main"> <div id="wrap"> <div id="header"> </div> <div id="content-wrap"> <div id="leftnav"> </div> <div id="content"> </div> <div id="sidebar"> </div> <div id="footer"> </div> </div> </div> </body> I am sitting here with a css challenge and I cannot even start to imagine how to do it. In fact, I think it is impossible to do, but just thought I'd ask you guys in case I am wrong: I want to create a dropdown menu (something like coolmenus) that can be created dynamically out of a database. The first thing I want to happen is that all primary navigation items are lined up horizontally next to eachother. That one was easy: I put each item into a DIV and float them left. Now the problem: whenever a user moves the mouse over a primary navigation item, a dropdown menu will appear underneath it. However (!), this dropdown menu may be wider than the DIV above it! Here an example: ------------- ------------- | Item 1 | | Item 2 | ------------- ------------- ----------------------- | Dropdown 1 | ----------------------- ----------------------- | Dropdown 2 | ----------------------- The problem I see is that I want the dropdown menu to always be left aligned with the primary navigation item. As I don't know the absolute position of either of them (being created dynamically out of a database), the only way to get the left alignment is to write the DIVs (primary item and its dropdown) directly after each other in the code. However, if I do that I cannot get the primary navigation items to appear one next to each other. Well, I could, but they wouldn't overlap with the dropdowns as I want them to. To give you an idea of what I am trying to achieve, have a look at the dropdown he http://www.rmitenglishworldwide.com...ts/products.asp Right now, I'm using CSS to have text overlap an image. I did this simply by having the placement code for the text appear after the placement code for the image in my .shtml file. Is this the correct way of doing this? |