CSS - Nested Divs And Rendering Font Different For Same Style.
Hi!
I have a problem at andreaspohlmann.com with an (on win7) IE8 Problem, same problem on XP for FF and IE. The text underneath the start images should be the same format as the text underneath any of the gallery pics: see http://www.andreaspohlmann.com/wirtschaft/daimler/ difference between the two is first is nested 2 divs further, due to the slideshow and has a class instead of the id the style that should be applied is: (i used everything I could think of to disable inheritance) #bu h1, .bu h1, .caption { font-family:"Arial", Helvetica, sans-serif; background-color:none; color: #000; text-decoration: none; word-spacing: normal; text-align: right; letter-spacing: 0; text-indent: 0; line-height: 10px; font-size: 10px; font-weight: bolder ; font-style: normal; text-transform: lowercase; display:block; } Still IE8 makes it look smaller, adding 1px makes it too large. the styles seem to be exactly the same in the IE developer thingy. I'm at a loss, any help apreciated. Cheers, Chris. Similar TutorialsHello, I've put out a test page so that you can see the problem. http://roobin.ericsson.googlepages.com/test2.html The buttons labeled: but3 and but5 is not showing the default inherited font: Verdana, i believe it is Arial. Right next to the text I have put a span with the style attribute to Verdana for comparision. Html: Code: <div class="clear"> nothing A: <a href="#" class="buttonize">but1</a> lorem ipsum <br /> <br /> <p> P A tiny: <a href="#" class="buttonize tinybuttonize">but2</a> lorem ipsum <br /><br /> still P br Button: <button type="button" class="buttonize">but3<span style="font-family:Verdana"> | but3 Verdana</span></button> lorem ipsum </p> nothing submit tiny :<input type="submit" class="buttonize tinybuttonize" value="but4" /> lorem ipsum Button: <button type="button" class="buttonize">but5<span style="font-family:Verdana"> | but3 Verdana</span></button> lorem ipsum </div> Css: Code: input.buttonize, button.buttonize, a.buttonize { /* display:block; float:left; margin:0 10px 0 0; */ background-color:#f5f5f5; background-color:#fff; border:1px solid #dedede; border-top:1px solid #eee; border-left:1px solid #eee; border:1px solid #919B9C; /* border-top:1px solid #ccc; border-left:1px solid #ccc; */ /* font-family:"Lucida Grande", Tahoma, Arial, Verdana, sans-serif; font-size:100%; line-height:130%; font-weight:bold; */ /*letter-spacing:0.1em;*/ text-decoration:none; color:#565656; color:#000; cursor:pointer; padding:5px 5px 6px 2px; /* Links */ padding:3px 10px 3px 10px; /* Links */ background: #006A4D url('/images/gradient40.png') repeat-x; color:#fff; border-style:outset; } a.buttonize { margin:3px 10px 0 0; } input.buttonize, button.buttonize { margin:3px 10px 0 0; padding:3px 10px 3px 10px; #padding: 3px 10px 3px 10px; /*ie*/ width:auto; overflow:visible; } input.tinybuttonize, button.tinybuttonize { padding: 1px 1px 0px 1px; #padding: 0px 8px 0px 8px; /*ie*/ width:auto; overflow:visible; font-size: 10px; margin:auto; } I would really apriciate some help in this matter. Thanks I have the following CSS styles: Code: #content p { font-size: 24px; } .smalltext p { font-size: 12px; } Then, I create a #content div in my HTML with three paragraphs in it. I want the middle paragraph to have the .smalltext class, like this: http://www.toprival.com/temp/css_question.gif With the CSS the way I have it, the font size (12px) of the .smalltext paragraph is ignored. But if I change the CSS so both selectors are IDs, or so both are classes (and update the HTML accordintly), it works. Why is that? Hi, i am getting a delay in the css rendering the position of divs, on my page, in ie6. This doesn't happen every time i load the page, but every so often certain floated divs are out of position and then they snap back into position after 2-10 seconds. Anybody suggest a solution??? The link to my stylesheet is in the header, so i can't imagine its to do with the stylesheet not loading up before the page is displayed. Thanks for your help I am having a problem with a couple divs not rendering correctly. I'm building an online tournament bracket system, and I'd like the divs to be flush with each other, but in all browsers it's rendering incorrectly. css Code: Original - css Code <style type="text/css"> div { font-family: Arial, Verdana, "Times New Roman", sans-serif; font-style: normal; color: Black; } .gamecontainer { position: absolute; width: 120px; } .player { font-size: 12px; background-color: lightblue; width: 100%; text-indent: 0.5em; border: solid 1px; margin: 0px; padding: 0px; } .infoblock { border-right: solid 1px; font-size: 10px; width: 100%; text-indent: 0.5em; margin: 0px; padding: 0px; } </style>
html4 Code: Original - html4 Code <div id="W-R1-G1" class="gamecontainer" style="top: 10px; left: 1090px;"> <div id="W-R1-G1-P1" class="player">Player 1</div> <div id="W-R1-G1-I" class="infoblock" style="height: 20px;">W-R1-G1</div> <div id="W-R1-G1-P2" class="player">Player 2</div> </div> <div id="W-R1-G2" class="gamecontainer" style="top: 75px; left: 1090px;"> <div id="W-R1-G2-P3" class="player">Player 3</div> <div id="W-R1-G2-I" class="infoblock" style="height: 20px;">W-R1-G2</div> <div id="W-R1-G2-P4" class="player">Player 4</div> </div> <div id="W-R2-G1" class="gamecontainer" style="top: 30px; left: 1210px;"> <div id="W-R2-G1-P1" class="player">Player 1</div> <div id="W-R2-G1-I" class="infoblock" style="height: 45px;">W-R2-G1</div> <div id="W-R2-G1-P2" class="player">Player 2</div> </div> <div id="W-R1-G1" class="gamecontainer" style="top: 10px; left: 1090px;"> <div id="W-R1-G1-P1" class="player">Player 1</div> <div id="W-R1-G1-I" class="infoblock" style="height: 20px;">W-R1-G1</div> <div id="W-R1-G1-P2" class="player">Player 2</div> </div> <div id="W-R1-G2" class="gamecontainer" style="top: 75px; left: 1090px;"> <div id="W-R1-G2-P3" class="player">Player 3</div> <div id="W-R1-G2-I" class="infoblock" style="height: 20px;">W-R1-G2</div> <div id="W-R1-G2-P4" class="player">Player 4</div> </div> <div id="W-R2-G1" class="gamecontainer" style="top: 30px; left: 1210px;"> <div id="W-R2-G1-P1" class="player">Player 1</div> <div id="W-R2-G1-I" class="infoblock" style="height: 45px;">W-R2-G1</div> <div id="W-R2-G1-P2" class="player">Player 2</div> </div> Scenario: I have an MS-Access application that uses a webbrowser control to display help. WebBrowser is IE. Suddenly the titles on my index page went missing ... no not missing. If I scrolled down and then scrolled back up they rendered. Sometimes rendering only partially (the bottom half of the words "Help Index" missing, top half rendered). The behavior replicated in the IE browser. Firefox and W3C meanwhile both indicated everything was groovy. Here was the context: Code: HTML <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html lang="en" xml:lang="en" dir="ltr"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Diverse Leader Program Database Help System: Index</title> <link href="css/dlpd0.css" rel="stylesheet" type="text/css" /> </head> <body> <div class="tpage"> <div class="idxbar"><a href="index.html">Help Index</a></div> <div class="dlpdtitle">Diverse Leader Program Database</div> <div class="dlpdsubtitle">Help Index</div> etc. Odd. What's more the page was nearly identical to the dozens of other pages in the same help system. The css was innocent enough Code: CSS .dlpdtitle { background:#ffffff; font-weight: bold; font-size: 16px; font-family: Arial, Helvetica, Sans-Serif; color:#012345; margin-left: 0px; margin-right: 0px; margin-bottom: 0px; margin-top: 0px; } Four hours later ... The culprit was this: Code: HTML <a name="userdoc"></a><hr /> Everything reverted to placid normalcy with just this: Code: HTML <a name="userdoc"></a> <br /><hr /> So ... there you have the results of my investigation into this very bizarre quirk that probably none of you will ever encounter. But if you do ... now you know ;-) I think it's time for my lunch break now ... I have a div: .gallery{width:95%;margin:0 auto;padding:5px;border:solid 1px black;} and inside I have: .galleryItem{float:left;width:150px;padding:5px;height:150px;border:solid 1px black;} .spacer{clear:both;} Used to give height to the container div. The idea is to create and even sized box for varying jpgs. How do I get the inside divs to space themselves out evenly across the space? AND the get the jpg to align itself in the middle of its containing div? Thanks. First off - I'm not even sure if its technically allowed or correct but I am nesting 3 <div>'s in one container <div> (I assume this is ok - quite positive) So when positioning nested <div>'s I am running into problems. Here is the link http://www.nextwavehosting.net/new (looking at the bottom bar with the website thumbnail, info, and the word test) Here is a snippet of code... The container... Code: div.bottomInfo { position: absolute; top: 510px; left: 15px; width: 723px; height: 190px; z-index: 6; background-color: #EDEBE6; } The nested <div>'s Code: div.featured { position: relative; top: 15; left: 252; width: 150px; height: 114px; z-index: auto; } div.featInfo1 { position: relative; top: 20; left: 252; width: 150px; height: 35px; z-index: auto; } div.featInfo2 { position: relative; top: -32; Left: 670; z-index: auto; } the first nested <div> is positioned exactly how it should... the 2nd <div> is correct horizontally but vertically i would assume that it is still being positioned relative to the container... meaning that the second <div>'s top: 20; should be more like top: 140; to position it just below the first <div> yet the top: 20; works... the 3rd one is way off and is nearly impossible to position correctly... Any helpful tips or advice on this one? Hi All, I have the following html: Code: <div class="businessItem"> <div class="bizIcon"> <img src="GetImage.axd?type=1&business=3" alt="My Biz" /> </div> <div class="bizInfo"> <a href="business.aspx?business=3"> My Biz </a> <p> my biz </p> </div> <div class="bizContact"> <a href="www.myweb.com">www.myweb.com</a><br /> <a href="mailto:roman.rodov@gmail.com">roman.rodov@gmail.com</a><br /> 90294767 </div> </div> <div class="businessItem"> <div class="bizIcon"> <img src="GetImage.axd?type=1&business=4" alt="My Second Business" /> </div> <div class="bizInfo"> <a href="business.aspx?business=4"> My Second Business </a> <p> My second business </p> </div> <div class="bizContact"> <a href="www.myweb.com">www.myweb.com</a><br /> <a href="mailto:roman.rodov@gmail.com">roman.rodov@gmail.com</a><br /> 90294767 </div> </div> And the following CSS that applies: Code: div.businessItem { background-color: #66cc66; margin-bottom: 10px; width: 100%; padding: 10px 10px 10px 10px; } div.bizIcon { float: left; width: 64px; margin: 0px 10px 0px 0px; } div.bizInfo { float: left; width: 256px; } div.bizContact { float: left; width: 256px; } now the problem is that it looks like crap in FF2 and looks ok in IE7 (haven't tested IE6 yet). The idea is to have a full width div with 3 divs inside side by side. It looks *completely* different in FF2. Does anyone have any ideas? (I'm pretty new to CSS, just learning). This could be argued that it belongs in a JavaScript forum but I think the core of the problem lies in where the information should go so I shall post it here. Code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>My site</title> <meta http-equiv="Content-Type" content="text/html;charset=utf-8" /> <style type="text/css"> #base { clear: both; padding-top: 1px; border-top: 1px solid #ffffff; border-bottom: 1px solid #ffffff; width: 100%; background: #0f0f0f; } /* end #base */ #main_block { background: #0000ff; margin: auto; text-align: left; width: 955px; } /* end #main_block */ #main_content { background: #ffffff; border-left: 1px solid #0000ff; border-right: 1px solid #0000ff; } /* end #main_content */ #top_main_content { padding-top: 1em; } #top_main_content ul { float: left; list-style-type: none; border-spacing: 0; border: 0; margin: 0; padding: 0; text-align: right; border-top: 1px solid #ff0000; height: 243px; width: 266px; } /* end #top_main_content ul */ #top_main_content ul li { color: #00ff00; width: 266px; border-bottom: 1px solid #ff0000; } /* end #top_main_content ul li */ #top_main_content ul li a { line-height: 26px; display: block; color: #00ff00; width: 266px; } /* end #top_main_content ul li a */ .indent { padding-right: 1.5em; } #top_main_content ul li a:hover { background: #cfcf00; color: #000000; } /* end #top_main_content ul li a:hover */ #top_main_content #rotating { z-index: 0; float: right; width: 687px; height: 242px; border-bottom: 1px solid #ff0000; border-top: 1px solid #ff0000; } /* end #top_main_content #rotating */ #default { position: absolute; visibility: visible; } /* end #default */ #a { position: absolute; visibility: hidden; } /* end #a */ #b { position: absolute; visibility: hidden; } /* end #b */ #c { position: absolute; visibility: hidden; } /* end #c */ #d { position: absolute; visibility: hidden; } /* end #d */ #e { position: absolute; visibility: hidden; } /* end #e */ #f { position: absolute; visibility: hidden; } /* end #f */ #g { position: absolute; visibility: hidden; } /* end #g */ #h { position: absolute; visibility: hidden; } /* end #h */ #i { position: absolute; visibility: hidden; } /* end #i */ </style> <script language="javascript"> function change_graphic(to_visible) { var num_elements = 10; var elements = new Array(num_elements); var i = 0; elements[i++] = "default"; elements[i++] = "a"; elements[i++] = "b"; elements[i++] = "c"; elements[i++] = "d"; elements[i++] = "e"; elements[i++] = "f"; elements[i++] = "g"; elements[i++] = "h"; elements[i++] = "i"; var temp = ""; for(i = 0; i < num_elements; i++) { document.getElementById(elements[i]).style.visibility = "hidden"; } document.getElementById(to_visible).style.visibility = "visible"; } // end function change_graphic(path) </script> </head> <body> <div id="base"> <div id="main_block"> <div id="main_content"> <div id="top_main_content" onmouseout="change_graphic('default');"> <ul> <li onmouseover="change_graphic('a');"><a href="#"><span class="indent">Link A</span></a></li> <li onmouseover="change_graphic('b');"><a href="#"><span class="indent">Link B</span></a></li> <li onmouseover="change_graphic('c');"><a href="#"><span class="indent">Link C</span></a></li> <li onmouseover="change_graphic('d');"><a href="#"><span class="indent">Link D</span></a></li> <li onmouseover="change_graphic('e');"><a href="#"><span class="indent">Link E</span></a></li> <li onmouseover="change_graphic('f');"><a href="#"><span class="indent">Link F</span></a></li> <li onmouseover="change_graphic('g');"><a href="#"><span class="indent">Link G</span></a></li> <li onmouseover="change_graphic('h');"><a href="#"><span class="indent">Link H</span></a></li> <li onmouseover="change_graphic('i');"><a href="#"><span class="indent">Link I</span></a></li> </ul> <div id="rotating"> <div id="default"><img src="images/default.gif" alt="" /></div> <div id="a"><img src="images/test_image_a.gif" alt="" /></div> <div id="b"><img src="images/test_image_b.gif" alt="" /></div> <div id="c"><img src="images/test_image_c.gif" alt="" /></div> <div id="d"><img src="images/test_image_d.gif" alt="" /></div> <div id="e"><img src="images/test_image_e.gif" alt="" /></div> <div id="f"><img src="images/test_image_f.gif" alt="" /></div> <div id="g"><img src="images/test_image_g.gif" alt="" /></div> <div id="h"><img src="images/test_image_h.gif" alt="" /></div> <div id="i"><img src="images/test_image_i.gif" alt="" /></div> </div> </div> </div> </div> </div> </body> </html> What I have is a set of links that when hovered will change the contents of the rotating div to reflect information about that particular link. As the code stands now, whenever any other item is moused over, the div will reset to the default div. What I would like to happen is whenever the top_content div is mousedoff (new word?), the content resets to the default. Thus I should be able to hover over a link, change the content of the rotating div, and move from that link directly to the content and mouse around over there all I want without changing back to the default div. To me, what I have should work in that I am thinking of nested divs as a parent/child relationship but that is obviously not how the browser is interpreting it. Any ideas on how I can achieve this? The JavaScript portion has been tested and works correctly. Edited: This code also pushes the side menu into the border in Opera. This problem was addressed and fixed in a previous thread but I broke it again. Hello all, I've been scratching my head on this one for a bit. First of all, here's the site I'm working on: http://dev.discoverahost.com If you'll note, the background for the content is currently blank. I'm trying to get a background to cover that area. Here's the basic structure for that page: Code: <div id="main_header"> </div> <div id="main_navigation"> Home :: About :: Link :: Such and Such </div> <div id="content_wrap"> <div id="image_below_nav"> </div> <div id="content_main_header"> </div> <div id="content_main"> Lorem Ipsum blah blah blah </div> </div> Note: That's not all the code. You can look at the souce for the full thing. The background I'm trying to apply I want to go on the wrapper background (content_wrap). I've got it all defined in the CSS file, located he http://dev.discoverahost.com/css/style.css The problem is that the wrapper isn't expanding vertically to include the background, even though I've got plenty of text inside of another nested div. Now it works if I put content outside of these divs ... which I really don't want to do. Maybe I've got my structure all wrong for doing this kind of thing, but any and all help is very much appreciated. Thanks! - Adam Not sure about this one- maybe someone can help shed some light on it? I have a <div> that contains a form. This div is dynamically-sized and floated left. What I want to do is place a nested <div> inside it so that it will cover the form below it. What's happening is that if I add the nested <div>, it pushes the form in it's container <div> down, which is obviously not what I want. I have tried using z-index on this nested <div> but with no success. Here is the code I'm using: Code: <div id="formdiv" style="display:block; padding-right:15px; padding-top:10px; border-right:#A0A0A0 1px dotted; float:left; width:auto; height:100%;"> <div id="overlaydiv" style="top:0px; left:0px; width:100%; height:100%; background-color:#FF0000; z-index:500;"></div> <form> ... </form> </div> There is other <div> tags before and after the 'formdiv', which are part of the page layout, but do not need to be covered by the 'overlaydiv'. I should note that 'formdiv' is itself inside a container <div>. I have tried various combination of CSS settings, but they don't give the same result. position:absolute; covers EVERYTHING within the uppermost container <div>, obviously not what I want. I've tried putting the form into it's own <div>, but I get the same result- the form just gets pushed below the 'overlaydiv'. Anyone have any ideas? Thanks, - skubik if i create a div box with some transparency and then create another div insde it then the second div takes on the opacity of the containing one. how can i stop this? <div class = "f"> <div class = "s"> hello </ div> </div> the css code: .f{ background: 669999; width: 500px; height: 300px; position: absolute; top: 15px; left: 80px; z-index:1; /* for IE */ filter:alpha(opacity=60); /* CSS3 standard */ opacity:0.6; } .s{ background: 55ffcc; width: 400px; height: 200px; position: absolute; top: 15px; left: 20px; padding: 40px; } So, I have a div for content that contains three other divs for a three column display, like this: Code: <div id="content"> <div id="col1" class="column">filler filler filler</div> <div id="col2" class="column">filler filler filler</div> <div id="col3" class="column">filler filler filler</div> </div> now my CSS looks like this: Code: #content { top:10%; height: auto; background:#009999; border-width:thin; border-style:solid; border-color:#003333; overflow:hidden; } .column { position:absolute; top: 0%; width: 30.66%; display:block; } the problem is that the content div isn't resizing to fit the column divs. It's just a tiny thin strip at the top. It is also not hiding any of the column divs, it shows all of them. If I change height to, say, 200px it resizes to that value, and if I put text directly into that div (as opposed to the text in the column divs) it resizes to fit that. Any help/ideas would be greatly appreciated, thanks. I am having a problem using nested hidden divs. I'd like to know if what I am doing is even possible. I have one div that is set to "display: none". Inside this div I have another set to "display: none". When I change the style of the outer div to "display: block", the inner div appears as well. Is there a way to keep the inner div hidden?? Hey everyone. Ran into a little snafu with CSS in firefox and NN last night. What I had, basically, was: Code: <DIV style='position:relative; margin-top:90px;'> <DIV style='position:relative; margin-top:14px;'> <img src='someimage.gif'> </DIV> <DIV style='position:relative; margin-top:8px;'> <img src='someimage2.gif'> </DIV> </DIV> the margin-top:14px was having absolutely no effect. The 8px one worked, but the 14px one only moved when I set it to over 90px, which would be more like absolute positioning, no? Now of course this could be rectified by just setting the top margin of the outter div to 104px and getting rid of the 14px one alltogether, but I'm sure there'd be instances where I'm using a php include for the inner divs or somthing and that wouldn't be an option. Can anyone offer me any thoughts or clarity on this? It worked fine in IE. Thanks. I am using style sheet for fonts etc. I was wondering is it OK to use style sheet and <Font> tags at the same time on a page. I mean if you are using certain font only once. Why bother creating a class in style sheet and then calling using that class .. heyya all, Lets say you make div 10px high, line-heigh of 50% and a font-size on 10px. In netscape the div maintains it's 10px height, and the decenders of the font are outside of the div. In IE the div expands to 12px. adding overflow:none changes nothing. thoughts? see pic.. I have a menu system that I'm triyng to nest in my navbar div. The problem is that the absolute postioning of the nested divs are causing them to bust out of the navbar div. What can I do to remedy the problem. Here is my CSS Code: #header { width: 100%; height:145px; background-image: url(images/topbackground2.jpg); background-repeat: repeat; } #navbar { width: 122px; background-color:#3f79a1; position: relative; float: left; border; } #content { height:100%; background-color:#3f79a1; position: relative; float: right; } #footer { background-image: url(images/gradientsmaller2.gif); font: 10pt; background-color: #ccffcc; width: 100%; text-align: center; padding: 0 15%; clear:both; } Here is the html for the navbar div Code: <div id="navbar"> <div id="p7menu1" style="position:absolute; left:0px; top:15px; width:122px; z-index:106"><a href="javascript:;" onClick="P7_trigMenuMagic1('p7menu1',1);return false" onMouseOver="P7_rollCMenu1(event,'p7menu1',0)" onMouseOut="P7_rollCMenu1(event,'p7menu1',0)" onFocus="if(this.blur)this.blur()"><img src="images/Login.gif" width="122" height="20" name="p7mbut1" border="0" alt="menu 1"></a></div> <div id="p7menu2" style="position:absolute; left:0px; top:35px; width:122px; z-index:107"><a href="javascript:;" onClick="P7_trigMenuMagic1('p7menu2',1);return false" onMouseOver="P7_rollCMenu1(event,'p7menu2',0)" onMouseOut="P7_rollCMenu1(event,'p7menu2',0)" onFocus="if(this.blur)this.blur()"><img src="images/EditProfile.gif" width="122" height="20" name="p7mbut2" border="0" alt="menu 2"></a></div> <div id="p7menu3" style="position:absolute; left:0px; top:55px; width:122px; z-index:108"><a href="javascript:;" onClick="P7_trigMenuMagic1('p7menu3',1);return false" onMouseOver="P7_rollCMenu1(event,'p7menu3',0)" onMouseOut="P7_rollCMenu1(event,'p7menu3',0)" onFocus="if(this.blur)this.blur()"><img src="images/InstructorInfo.gif" width="122" height="20" name="p7mbut3" border="0" alt="menu 3"></a></div> <div id="p7menu4" style="position:absolute; left:0px; top:75px; width:122px; z-index:109"><a href="javascript:;" onClick="P7_trigMenuMagic1('p7menu4',1);return false" onMouseOver="P7_rollCMenu1(event,'p7menu4',0)" onMouseOut="P7_rollCMenu1(event,'p7menu4',0)" onFocus="if(this.blur)this.blur()"><img src="images/MyCourses.gif" width="122" height="20" name="p7mbut4" border="0" alt="menu 4"></a></div> <div id="p7menu5" style="position:absolute; left:0px; top:95px; width:122px; z-index:110"><a href="javascript:;" onClick="P7_trigMenuMagic1('p7menu5',1);return false" onMouseOver="P7_rollCMenu1(event,'p7menu5',0)" onMouseOut="P7_rollCMenu1(event,'p7menu5',0)" onFocus="if(this.blur)this.blur()"><img src="images/GradeBook.gif" width="122" height="20" name="p7mbut5" border="0" alt="menu 5"></a></div> <div id="p7submenu1" class="pviimenudiv" style="position:absolute; left:142px; top:35px; width:102px; visibility: hidden; z-index:101"> <table width="108" border="0" cellspacing="6" cellpadding="0"> <tr><td>stuff</td></tr> </table> </div> <div id="p7submenu2" class="pviimenudiv" style="position:absolute; left:142px; top:55px; width:102px; visibility: hidden; z-index:102"> <table width="108" border="0" cellspacing="6" cellpadding="0"> <tr><td>stuff</td></tr> </table> </div> <div id="p7submenu3" class="pviimenudiv" style="position:absolute; left:142px; top:75px; width:102px; visibility: hidden; z-index:103"> <table width="108" border="0" cellspacing="6" cellpadding="0"> <tr><td>stuff</td></tr> </table> </div> <div id="p7menubottom" class="pviimenudiv" style="position:absolute; left:10px; top:115px; width:102px; visibility: visible; z-index:111"> <table width="108" border="0" cellspacing="6" cellpadding="0"> <tr><td>stuff</td></tr> </table> </div> </div> Sorry for so much code. I'm completely frustrated! I can't seem to get this layout to work at all. I was using frames which was fine but I have to make this work without frames now. Thanks for any help. I'm aiming to have a flash navigation console nested inside a div which extends outside the left boundary of it's parent div. It's very hard to explain exactly so I've drawn some diagrams. Here's what I'm trying to acheive: URL Here's the actual result i've come up with so far: http://www.advancedschoolyearbooks.com/divtest.html The results differ depending on the browser. In IE the horizontal positioning of the "NavInner" DIV is spot on but vertically it is hugging the top of the "Wrapper" table when it should be hugging the top of the "Navigation" DIV In firefox I can not see the image contained in the "NavInner" DIV at all. Here's a snip of my CSS: Code: body, html, #wrapper { margin-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; background-color: #000000; height: 100%; } #wrapper { margin: 0 auto; text-align: left; vertical-align: middle; width: 100%; } #OuterFull { width: 100%; text-align: center; display: block; } #OuterBoxed { width: 969px; height: 650px; display: block; margin: 0 auto; } #LeftCol { width: 485px; height:650px; float: left; } #RightCol { width: 484px; height: 650px; float: left; background: url(bg.jpg) bottom left no-repeat; } #Navigation { width: 484px; height: 180px; float: right; overflow: hidden; text-align: right; margin: 0 auto; } #NavInner { width: 969px; height: 180px; float: right; text-align: right; position: relative; left: -485px; } #Content { width: 484px; height: 470px; float: right; overflow-y: auto; overflow-x: hidden; } Here's my HTML: Code: <body> <table width="100%" border="0" cellspacing="0" cellpadding="0" id="wrapper"> <tr> <td align="center" valign="middle"> <div id="OuterFull" align="center"> <div id="OuterBoxed"> <div id="LeftCol">LeftCol</div> <div id="RightCol"> <div id="Navigation"> <div id="NavInner"><img src="nav.jpg" /></div> </div> <div id="Content">Content</div> </div> </div> </div> </td> </tr> </table> </body> Hi, I'm trying to build a modal box tool. Yes I know downloadable solutions exist, but wisely or not I'm building from scratch. And the javascript is fine, but on the CSS I feel I'm not quite doing it right. The HTML structure is pretty straightforward: PHP Code: <div id="PopUpBox" class="SinglePopUpBox" style="display:none"> <div class="TopBar"> <div class="CloseX"><a href="javascript:closePopUp()"><img src="Images/WindowCloseX.PNG" /></a></div> <div id="PopUpBoxTitle" class="Title"></div> </div> <div id="PopUpContainer" class="Container"><b style="color:#FFFF00">...Connectiing...</b></div> </div> and I just stick that on any underlying page with a button to make it appear. Ajax connects and injects the chosen content into PopUpContainer. Here's the issue. PopUpBox I want to be a percentage of the screen, to work on any size window. It appears in the middle via percentages. TopBar within that is a fixed height. And then PopUpContainer should fill the rest of the PopUpBox. So I set height=100% on PopUpContainer. But then it overflows the box by exactly the height of TopBar. At first I thought "hey, this sounds like a job for clearfloat" but that doesn't work. And it shouldn't, because floats aren't the issue. The problem I believe is going to 100% of a variable size. % of (% - x) to be more precise. So I "fix" this by giving PopUpBox enough padding-bottom to match the size of TopBar. This immediately feels bad, and I don't even know why. But it looks good, so I was prepared to shut up and accept it. However, IE7 (and probably 6, if I wanted to try it) don't play along. (Ditto IE8 in compatability mode, naturally.) They don't seem to respect that height=100% at all, and will make the Container shrink or bust out depending on what's inside. So what's the right approach to doing this? I'm quite willing to make moderate changes to my approach, but less happy to do stuff like add 12 pages of javascript to resize the box. CSS: PHP Code: div.SinglePopUpBox { color: #FFFFFF; border: 1px solid #CCCCCC; background-color: #000000; position:fixed; z-index: 100; left: 15%; top: 15%; right: 15%; bottom: 15%; padding:0px; padding-bottom:31px; /* Made to match height of TopBar + Container margin + Container Border + this border */ } div.SinglePopUpBox div.TopBar { background-color:#000000; background-image: url(Images/TopBar-Black.PNG); width:100%; height:26px; vertical-align:bottom; } div.SinglePopUpBox div.TopBar div.CloseX { float:right; margin-right:5px; } div.SinglePopUpBox div.TopBar div.Title { font-weight:bold; font-size:14px; padding-top:5px; padding-left:10px } div.SinglePopUpBox div.Container { background-image: url(Images/BackgroundBlue.JPG); overflow:auto; height:100%; padding-left:20px; padding-right:20px; margin-left:3px; margin-right:3px; border: 1px solid #CCCCCC; } |