HTML - Child Div's, Faux Columns, Floating Left = Fail
I have a parent div=body, and four child div's=sidebar (dark gray), spacer1, content (white), and spacer2. Those are not the backgrounds of the individual div's. I'm using a faux columns method of taking the parent's bg and y-repeating it. You can see the problem below.
This works in IE6, but not in Firefox. This would lead me to assume there's a problem in my coding, but the way FF is displaying it...it's like firefox is placing it in a different column just to peeve me off. In IE6 (perfect): In FF (looks like script was placed in spacer1 column--padding:10 for content div) I noticed it repeated correctly for the first div, but it's like it started over with the spacer1 div and doesn't even repeat down: Here is the code: Code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>DCS College Football Ratings and College Football News</title> <link rel="stylesheet" href="css/jd.gallery.css" type="text/css" media="screen" /> <script src="scripts/mootools.v1.11.js" type="text/javascript"></script> <script src="scripts/jd.gallery.js" type="text/javascript"></script> </head> <body background="images/bg.png"> <div id="container" style=" width:785px; background:inherit; height:auto; margin:0 auto;"> <div id="header" style="background:url('images/layout_01.png'); width:785px; height:121px;"></div> <div id="navbar" style="background:url('images/layout_02.png'); width:758px; height:26px; padding-top:9px; padding-left:27px; clear:both;"> <font color="#cecece" face="Verdana" size="2"><b>»Home »The D-Report »DCS Ratings »Custom Helmets »About the DCS</b></font></div> <div id="subheader" style="background:url('images/layout_03.png'); width:785px; height:49px; clear:both;"></div> <div id="body" style="background:url('images/contentbg.png'); width:785px; height:auto; float:left;"> <div id="sidebar" style="background:inherit; width:260px; padding:10px; height:auto; float:left; "> <font face="verdana" color="#cecece" size="3"><b>The D-Report</b></font><br><font face="verdana" color="white" size="1"><b>Info about the most current DCS news article here. More typing going on to fill up some more space, ya know what I mean?</b></font><br><br><br><br><font face="verdana" color="#cecece" size="3"><b>DCS Ratings</b></font><br><font face="verdana" color="white" size="1"><b>Info about the most current DCS ratings update here. More typing going on to fill up some more space, ya know what I mean?</b></font><br><br><br><br><font face="verdana" color="#cecece" size="3"><b>Custom Helmets</b></font><br><font face="verdana" color="white" size="1"><b>Info about the most current custom helmet here. More typing going on to fill up some more space, ya know what I mean?</b></font></div> <div id="spacer1" style="background:inherit; width:17px; height:auto; float:left; "></div> <div id="content" style="background:inherit; width:440px; padding:10px; height:auto; float:left;"> <div id="myGallery" style="width: 438px !important; height: 250px !important;" ><script type="text/javascript"> function startGallery() { var myGallery = new gallery($('myGallery'), { timed: true, showArrows: false, showCarousel: false }); } window.addEvent('domready', startGallery); </script> <div class="imageElement"> <h3>Item 1 Title</h3> <p>Item 1 Description</p> <a href="mypage1.html" title="open image" class="open"></a> <img src="images/brugges2006/1.jpg" class="full" /> <img src="images/brugges2006/1-mini.jpg" class="thumbnail" /> </div> <div class="imageElement"> <h3>Item 2 Title</h3> <p>Item 2 Description</p> <a href="mypage2.html" title="open image" class="open"></a> <img src="images/brugges2006/2.jpg" class="full" /> <img src="images/brugges2006/2-mini.jpg" class="thumbnail" /> </div> </div></div> <div id="spacer2" style="background:inherit; width:28px; height:auto; float:left; "></div> </div> <div id="footer" style="background:black; width:785px; height:86px; clear:both"> <div id="contentfooter" style="background:url('images/layout_10.png'); width:460px; height:52px; margin-left:297px;"></div> </div> </div> </body> </html> Could it have something to do with the image scripting? Similar TutorialsHello, I need to create a 3 -column lay out with the left and right columns having 200px each and the middle column take the rest. Here is my html markup: HTML Code: <div style="width: 100%"> <div style="width: 200px; float:left;">Left column</div> <div style="width: 100%; float:left;">Middle Column</div> <div style="width: 200px; float:left;">Right Column</div> </div> It's not working for me . Please help. Hi everyone, I'm trying to work out how to have a left and right side "column" both resize when the window is resized. An example of what I am after is : http://www.news.com.au/heraldsun/0,,,00.html. I played with margin-left and -right but don't think it is quite what I am after. Thanks. Hi All, I have just started my first page and there is a little problem with it that is driving me nuts. Basically, Im trying to make a simple page where the content is centered and there are two background columns on the right and left: we see these pages everywhere. Here is the code (pseudo) I am trying <body> <centered content> <body_divis> <pic> insert picture (top left) <pic> </body_div> </centered content> <body> now im using a css file in which we have: <centetred content> : fix width (1000px), auto left and right margin, gray background. <body_div>: white background. <pic>: 0 margins. So far so good, I get the desired effect: white page in the middle, two side columns in gray. All of this starts at the very top of the page. Now I just want to move the picture slighlty down. As soon as I do that the whole white centered section moves down with it, creating a horizental gray bar on top of the page that is driving me nuts.... it seems that the white section starts where the first object is placed. I just want it to start at the top and then plance my objects wherever. All margins are good in my code as I have checked and rechecked. I appreciate any help. Thanks, Kakeez Hello, I would like to make my two column web page into 3 columns and dont know how to do this. It is a template and I cannot figure out where to put the <td>. My site is online and then I hope to delete this link if it is possible. Please no negative remarks as I am notlooking for visitors I just want help. please. ] Here is the code I want to put into the code but not sure where to put it to get the 3rd column. I hope someone will be kind enough to help . thanks. <td width="200"> <table width="100%" border="1" cellspacing="0" cellpadding="0"> <tr> <td width="200"> <p> <a href="index.html">Home</a> </p> </td> </tr> </table> Hi, can someone please help me with this? In preview in dreamweaver it looks ok but in some browsers its horrible. When I turn the compatibility View on its not ok, bur if I turn it on its fine. I am a beginner and I used blogger in Chrome to create a blog. When I checked how it looked in IE it was horrible. The banners and some images did not move over correctly which I have hosted on photobucket. Can somebody look at my code and help me format it to IE. Hi, I have a java script function like this to open one child window form main window. Its working properly. function billingMain() { top.consoleRef=window.open('#{facesContext.externa lContext.requestContextPath}/main/billing/billingMain.jsf','window1', 'width=950,height=400' +',menubar=0' +',toolbar=0' +',status=0' +',scrollbars=1' +',resizable=0' +',location=0') top.consoleRef.document.close() } But when my child window opened, i want to open another child window from previous child window. and here is the script follows for this, function UB92Main() { top.consoleRef=window.open('#{facesContext.externa lContext.requestContextPath}/main/billing/claimInformation.jsf','UB92', 'width=450,height=250' +',menubar=0' +',toolbar=0' +',status=0' +',scrollbars=1' +',resizable=0' +',location=0') top.consoleRef.document.close() } here the second child window is not opening. How to resolve this. Thanks, Vinutha. Hi Folks, Before I submit code, of which there is a great deal, I was wondering if someone could help me understand a little problem with buttons. My setup is this: 1) A drop-down menu triggers the creation of the form associated with the selection. 2) On that form are three radio buttons which open another form depending on the selection. Sounds simple enough but once the form is opened via radio button you can't click on them until you re-select the same option from the drop-down menu. My objects are set up as follows: Main document - Main form - DD menu - Text field - Sub-form - 3 radio buttons - Sub-form MK2 - Buttons, text fields and labels oh my My thought process is I have a main form object which has a child (Sub-form) and its child has a child (Sub-form MK2). What's even more confusing is when I print out the status of any of the radio buttons it says they are enabled... I just can't interact with them. If you need code I can provide but it is somewhat long. Thanks for your help! i run a couple of norwegian webshops, and they all use the same backend, developed by myself. however im not using any kind of subversion system, and this sucks right now. check this link to one of my product-pages in your regular browser (not IE. i presume you use chrome or firefox) http://iphonedeksler.no/iphone-og-ip...0mah-sort.html then test it in IE, it looks like a complete mess, and its not possible to use the site at all. i recently made it W3C validated, but i think this error came after that. can anyone see what in the name of the lord is wrong in internet explorer?! Hi Everyone, Please refer to attached test.zip. Open a.htm, tested under IE, Safari, Firefox no problem, but ONLY google chrome fail, seems cannot use call parent javascript function under the child iframe. Please advice. Thanks Hi everyone, I've got a page that's being generated dynamically that I need to set the last <li> in each list to a different style. As it's being generated server-side, I can't predict how many <li> items there will be or assign a .last class to the last <li> in each list manually. Now I'm not sure whether this needs a CSS/Javascript/xmls solution, so any pointers would be most appreciated. In FF & Opera (I think) I could just use the last-child psuedo class and the world would be fine, however it doesn't work in IE6... Does anyone know if anyone's produced an IE javascript fix for this that I can just apply? Or is there another nifty hack? Any pointers would be most appreciated! HTML Code: <head> <script type="text/javascript"> function addGroup() { x=document.getElementById("group").getElementsByTagName("p"); groups=document.getElementById("groupName"); var j=0,i=0; if (groups.value=="") { alert('must create one group'); } for (i=0;i<x.length;i++) { if (x[i].innerHTML == groups.value) { alert('the group name is already created'); j==1; } } if (j==0) { x.appendChild(groups); } } </script> </head> <body> <div id="group"> <p>Group03</p> </div> <p><input type="text" id="groupName" size="84" maxlength="84" value=""/></p> <p><input type="button" value="create" onclick="addGroup()" /></p> </body> I am trying to do simple HTML that read a group from a input box and append the new group to the group section under id="group" but the appendChild does not seems to work, any clue on how to make it works? Hey, I'm trying to make a child div become the height of the child div the height of the parents. The parent's height is calculated by the browser depending on the rows of text inside the div. But when I try it, the child div only resizes to the number of rows inside the child. Here is a better example: http://nitronet.dnip.net:8080/Nitro%...ay/index.xhtml Help? --ness can you detect if a page is a child? (in an iframe) if (page is a child) { parent.remoteClick('myButton'); } else { } thanks. or the opposite i suppose... if (page is a parent) { } else { parent.remoteClick('myButton'); } I have main window and child window opened by child = window.open(adr, name, "height=200, width=600,resizable=1"); Both pages have <title>title</title> But whereas main widow has in title bar "title - Microsoft Internet Explorer" ,the child window has "http://<ip address> - title - Microsoft Internet Explorer" Why that difference? I want the ip address in child window to disappear, but don't know how. It does the same in IE6 and Mozilla. Thanks. I'm trying to set up html links in a parent window that update content in the same child window(rather than opening successive new windows with each click). Having the same target name in the anchor tag looks to be the easiest way to do this but it's not working in conjunction with a servlet mapping. This works: Code: <a href="test.html" TARGET="targetWindow">Click Here</a><BR> This doesn't work. This link will open a new window every time it's clicked Code: <a href="someURLmapping" TARGET="targetWindow">Click Here</a><BR> What is it about the servlet URL mapping that causes the links to not return to the child window? Is there another way to solve this issue? Thanks! Shawn Sorry if my title sounds a little strange lol. I've been designing a layout for a new site of mine, and I decided to (attempt to) comply with XHTML guidelines, and use DIV's rather tables. I've got a container div, which contains a couple more divs, such as for the header, left navigation, content etc. Problem is, the left navigation bar is going to be quite long as I plan to include a skyscraper ad underneath the navigation bar, if possible. I've put the left navigation bar inside the content div (as you can see in the pictures coming up)...so when there's not much content, because the left nav will be so tall the left nav extends beyond the content box - I was hoping to find a way to make the content div stretch to accomodate this. It strangely works as desired in IE7 (http://img515.imageshack.us/img515/7070/ie7ix9.jpg), but in Firefox it doesn't ( http://img180.imageshack.us/img180/2480/ffow1.jpg) Is there any way to make the content div expand with the left nav div? Thanks very much Source code: Code: <html> <head> <style type="text/css"> body { background-color: #272727; color: #FFFFFF; font-family: Verdana, Sans-Serif; font-size: 10px; margin: 0px; padding: 0px; text-align: center; } h1 { color: #adc203; font-size: 14px; text-align: center; } a:link { color: #adc203; } a:hover { color: #444444; } a:visited { color: #bbc758; } .container { width: 775px; background-color: #1a1a1a; margin-left: auto; margin-right: auto; } .header { width: 775px; height: 141px; } .logo { width: 611px; height: 141px; float: left; } .login { background-image: url(images/login.png); width: 164px; height: 141px; float: right; } .content { background-image: url(images/content.png); width: 775 px; background-repeat: repeat-y; text-align: left; } .innercontent { padding-left: 25px; padding-right: 25px; } .linkbox { margin-top: 5px; margin-right: 15px; width: 160px; background-color: #151515; float: left; font-size: 14px; } .linkbox div { padding: 5px; padding-top: 0px; } .linkbox h1 { color: #adc203; font-size: 14px; text-align: center; } .linkbox a:link { color: #FFFFFF; text-decoration: none; display: block; padding-left: 5px; } .linkbox a:hover { color: #FFFFFF; background-color: #abc203; padding-left: 5px; } .linkbox a:visited { color: #bbc758; padding-left: 5px; text-decoration: none; } .googlebox { float: left; clear: left; margin-top: 10px; margin-right: 15px; width: 160px; height: 600px; background-color: #161616; } </style> </head> <body> <div class="container"> <div class="header"> <div class="logo"><img src="images/logo.jpg" alt="DesignersVAULT" /></div> <div class="login">Test</div> </div> <div class="content"> <div class="innercontent"> <div class="linkbox"> <div> <h1><span style="color: #444444;">designers</span>vault</h1> <a href="link.html">Home</a> <a href="link.html">Contact Us</a> <a href="link.html">Suggest A Feature</a> <h1>tutorials</h1> <a href="photoshop.html">Photoshop</a> <a href="photoshop.html">XHTML</a> <a href="photoshop.html">CSS</a> <a href="photoshop.html">PHP/MySQL</a> <a href="photoshop.html">General Design</a> <h1>layouts</h1> <a href="photoshop.html">Free</a> <a href="photoshop.html">Premium</a> <a href="photoshop.html">Designed For You</a> </div> </div> <div class="googlebox"> </div> Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Mauris id ligula. Nam nec nunc sed nunc malesuada pretium. Curabitur at augue. Sed pede est, ultrices sit amet, semper quis, venenatis a, turpis. Nam fermentum neque in tortor. Proin tortor. Suspendisse posuere. Duis gravida nulla a lectus. Vestibulum porttitor aliquet lorem. Morbi tortor. Fusce elementum. Quisque scelerisque mauris vitae mi. Ut et orci id augue sollicitudin auctor. Proin urna. In nibh purus, gravida vel, vehicula nec, vulputate eu, quam. Donec quis dolor. Aenean sed arcu at lectus imperdiet sodales. Pellentesque egestas. Praesent id augue. Maecenas nisl. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Maecenas sed risus. Cras non ipsum. Duis mollis auctor nulla. Integer ornare orci a lorem. Praesent eleifend. Sed ac ligula et est faucibus rutrum. Aliquam felis. Sed elementum tempus erat. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Etiam lacinia massa et augue. Integer vel augue id arcu viverra tincidunt. In hac habitasse platea dictumst. Nunc sodales ante et nunc. Vivamus posuere. Morbi ipsum. Aliquam fermentum sollicitudin felis. Sed varius dolor ut leo. Duis consectetuer urna id eros. Suspendisse ut ante. Maecenas quis diam. Phasellus fringilla velit. Praesent interdum rhoncus tortor. Fusce sollicitudin. Mauris a nibh nec mauris tincidunt rutrum. Mauris malesuada, tellus in accumsan dignissim, quam ligula tempor enim, interdum feugiat nisi risus in elit. Vestibulum sapien. Aliquam erat volutpat. Sed id sem ac justo laoreet elementum. Aliquam urna. Curabitur felis. Nam sed purus non lacus hendrerit aliquet. Sed a urna a metus luctus venenatis. Aenean purus ante, rutrum eu, hendrerit vitae, tincidunt quis, nisi. Duis pellentesque, justo at malesuada vestibulum, urna dolor cursus mauris, eget luctus eros massa et purus. Nam magna. Ut aliquam sodales purus. Vestibulum ut augue sit amet est elementum lacinia. Vestibulum tempor est a magna. Nulla luctus pellentesque diam. Aenean elementum turpis et tortor. Maecenas feugiat rutrum erat. Nullam ac elit. Donec auctor gravida ligula. Vivamus posuere dui a arcu. Suspendisse potenti. Morbi dolor augue, sagittis quis, accumsan quis, aliquam molestie, enim. Phasellus faucibus odio id neque. Curabitur iaculis ligula ac purus. In quis ante ac ante bibendum vestibulum. Etiam a lacus id est rhoncus ultrices. Morbi vitae magna et erat porttitor luctus. Aliquam erat volutpat. Curabitur sit amet sapien sit amet nulla faucibus accumsan. Nam ornare, mauris vel dignissim commodo, risus dolor scelerisque purus, viverra porta lectus tortor quis mauris. Etiam at turpis eget nisi cursus pulvinar. Suspendisse ultrices. Vivamus blandit scelerisque odio. Curabitur fringilla eleifend nisi. Quisque vel purus vitae turpis auctor iaculis. Maecenas est pede, malesuada vel, adipiscing semper, adipiscing quis, tortor. Donec vitae nisl vel dolor lacinia sodales. Sed tempor. Nullam congue condimentum ante. Suspendisse blandit, nulla quis condimentum varius, tellus est posuere augue, a suscipit sem nulla dictum orci. Nunc sagittis turpis at ante. Donec sit amet massa et nulla lacinia mollis. Donec blandit, justo et faucibus tincidunt, pede massa eleifend tellus, id tristique mi nulla a nibh. Quisque commodo lacus nec diam. Aliquam suscipit. Aliquam a ante. Integer tincidunt purus vel pede. In hac habitasse platea dictumst. Etiam at nisi quis velit scelerisque ultricies. Sed dui lorem, fringilla sit amet, ultrices blandit, auctor a, magna. </div> </div> </div> </body> </html> Hi, I have a table in which some entries open a new window with the required information. when a new window is opened, my parent page scrolls to the top, and again I have to search for the row where I had been previously, What property should I set as to avoid this? Please reply.. |