CSS - Columns Dont Fit
The right column of this website just started appearing in the wrong place, as you can see he [deleted]
Unfortunately, i did not make the site but have been asked to fix it. I cant seem to find the cause of this at all, any help would be great, thanks! Edit: Found the mistake, a WYSIWYG field in the admin that shows on the header was screwing up the page with invalid code. Similar TutorialsHello, I'm working now on div layout that contains 3 sections (header, body, footer) in one centered wrapper with border (divs with background imgs). My problem is: - divs that are in fact borders (id="l_outerborder_b" and id="r_outerborder_b") don't stretch when main container (id="body_content_text") grows. Here is a html code: Code: <!--BEGIN TEMPLATE HEADER --> <!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> <link href="template.css" rel="stylesheet" type="text/css" /> <script type="text/javascript" src="template.js" /> </head> <body onload="onloadprocedures()"> <div id="main_container"> <div id="template_header"> <div id="tl_outerborder"></div> <div id="t_outerborder"></div> <div id="tr_outerborder"></div> <div id="l_outerborder_h"></div> <div id="header_content"> <div id="logo"><img src="img/logo.png" alt="" /></div> <div id="slogan"><img src="img/slogan.png" alt="Centrum zdrowia" /></div> </div> <div id="r_outerborder_h"></div> </div> <!-- END TEMPLATE HEADER --> <!-- BEGIN TEMPLATE BODY --> <div id="template_body"> <div id="l_outerborder_b"></div> <div id="body_content"> <div id="body_content_text"> <p>TEST</p> </div> </div> <div id="r_outerborder_b"></div> </div> <!-- END TEMPLATE BODY --> <!-- BEGIN TEMPLATE FOOTER --> <div id="template_footer"> <div style="clear:both"></div> <div id="l_outerborder_f"></div> <div id="footer_content"></div> <div id="l_outerborder_f"></div> <div id="bl_outerborder"></div> <div id="b_outerborder"></div> <div id="br_outerborder"></div> </div> </div> </body> </html> <!-- END TEMPLATE FOOTER --> and CSS: Code: @charset "utf-8"; /* CSS Document */ body { background-color:#FFFFFF; font-family:Tahoma, Verdana, "Times New Roman", Arial; font-size:12px; } a:link {text-decoration: none} /* unvisited link */ a:visited {text-decoration: none} /* visited link */ a:hover {text-decoration: none} /* mouse over link */ a:active {text-decoration: none} /* selected link */ #main_container { position:relative; margin:auto; width:960px; height:auto; } #template_header { float:left; position:relative; width:960px; height:300px; } #header_content { float:left; position:relative; width:900px; height:270px; } #logo { width:310px; height:130px; position:relative; float:left; top:0px; left:0px; } #slogan { width:580px; height:100px; position:relative; float:left; top:0px; left:0px; } #tl_outerborder { float:left; position:relative; background-image:url(img/tl_outerborder.png); width:30px; height:30px; } #t_outerborder { float:left; position:relative; background-image:url(img/t_outerborder.png); width:900px; height:30px; } #tr_outerborder { float:left; position:relative; background-image:url(img/tr_outerborder.png); width:30px; height:30px; } #l_outerborder_h { float:left; position:relative; background-image:url(img/l_outerborder.png); background-repeat:repeat-y; width:30px; height:270px; } #r_outerborder_h { float:right; position:relative; background-image:url(img/r_outerborder.png); background-repeat:repeat-y; width:30px; height:270px; } #body_content { float:left; position:relative; width:900px; overflow:hidden; } #body_content_text { float:left; position:relative; width:600px; margin: auto; overflow:hidden; } #l_outerborder_b { float:left; position:relative; background-image:url(img/l_outerborder.png); background-repeat:repeat-y; width:30px; height:inherit; } #r_outerborder_b { float:right; position:relative; background-image:url(img/r_outerborder.png); background-repeat:repeat-y; width:30px; height:inherit; } #l_outerborder_f { float:left; position:relative; background-image:url(img/l_outerborder.png); background-repeat:repeat-y; width:30px; height:inherit; } #r_outerborder_f { float:right; position:relative; background-image:url(img/r_outerborder.png); background-repeat:repeat-y; width:30px; height:inherit; } #template_body { float:left; position:relative; width:960px; overflow:hidden; } #bl_outerborder { float:left; position:relative; background-image:url(img/bl_outerborder.png); width:30px; height:30px; } #b_outerborder { float:left; position:relative; background-image:url(img/b_outerborder.png); width:900px; height:30px; } #br_outerborder { float:left; position:relative; background-image:url(img/br_outerborder.png); width:30px; height:30px; } Thanks in advance for info how to stretch those doomed divs EDIT: Here is layout concept. URL hTTp://qsrc.pl/layout.jpg Hi, so i dont know how else to explain this with out giving you the link ocixx.com/index1.html the three buttons on the right Facebook myspace twitter, everything is perfect with them, except when you click them nothing happens, i am using css file and scripts i found on the net, cause i cant program the source to the css file is in the source to the page, i dont know what to do Ok this is the website: http://mydeco.com/ and if you hover over the sections/links at the top, the subnav appear. However if you go to community section & then try to hover over different sections, the subnav dont seem to appear! This happens for a colleague of mine on FF & IE 7. However I have same browsers but this problem doesnt occur with me! she has cleared cache Hi newbie here, Just completed site for client, to find out that the CSS text does not appear in IE7. This is the exact source - <div id="homewrapper"> <div id="homeimage"> <div align="right"><a href="" target="_blank"><img src="images2/logo_07.png" alt="Enjoy England" width="131" height="178" border="0" longdesc="" /></a><a href="" target="_blank"><img src="images2/logo_09.png" alt="Tourism Newquay" border="0" longdesc="" /></a></div> </div> <div id="intro"> <p>For your perfect holiday in Newquay, come and stay at 12A Pentire Heights. We have a 2 bedroom self catering apartment which has fantastic sea views overlooking the world famous Fistral Beach.</p> <p> </p> <p>Pentire Heights is ideally located, being only a short walk from Fistral Beach, and a 20 minute walk from Newquay town centre. There is also a private car park space allocated to you while you stay.</p> <p><br /> In Newquay you will find an array of shops, bars, bistros, restaurants, pubs, clubs and night life. Explore the cliff top walks along one of the eleven superb beaches or visit some of the many attractions in the town or close by, such as the Zoo, Golf Course, Trenance Leisure Park, Waterworld and the Sea Life Centre.<br /> <br /> Pentire Heights apartments in Newquay provides an ideal base for visiting the whole of Cornwall.</p> </div> Any help will be much appreciated! Cheers! Hi, I was learning CSS and it didn't quite explain what the second img does. Code: div.img img { display: inline; margin: 3px; border: 1px solid #ffffff; } Also on some sites i noticed it would have more than one tag: Code: div.img img img img img {} or Code: div div div div {} if you could help, thank you Hi all, http://www.zitrote.com/forum/index.php?act=viewforum&f=4 if you see there in IE the two borders on the right dont appear in the topic listing but in FF they do?? i have two css boxes on the company lan, and for one person the two boxes wont appear? is this a problem with internet explorer? ok, so lets say i have two <div>s. the parent, i want to be a tad translucent, but the child i don't want to be. is there anyway i can stop that opacity property from cascading? example: Code: <style> #div1 {filter: alpha(opacity=50); -moz-opacity: .5; } #div2 {propery:value; blah blah blah} </style> <div id="div1"> <div id="div2"> Some text and content here </div> </div> thanks! later Hello. I designed my site using Ie, and an now getting some complaints from members who are switching to firefox. I am a total CSS newbie and I don't know exactly where to begin to troubleshoot this. URL thats the page, you will need to use username: css password: test It looks fine in IE6, but doesnt look ok in firefox. The CSS stylesheet is at URL Thank you for any help you can provide. Ok, some trouble with Fire Fox and IE. I am creating a site for Ernies Inn and for right now I am hosting it here until I am done and the owner is willing to have it. http://ernies.bombinaid.com Problems IE: The main box areas in each page keeps going over the menu! FireFox: In the menu page it seems every time the mouse goes over a h3 tag it has a mouse over effect. I am using <a name="something"> for the page jumping. Here is the css code: Code: body {background-color: black} .header {width: 100%; margin-left: -1px; margin-top: -4px;} .links {width: 100%; text-align: center; background-image: url('defult.gif'); background-repeat: repeat-x;} .main {background-color: #cc3333; height: auto; width: 700px; margin-top: -34px; margin-left: 7cm;} .main2 {background: url(corner1.gif) 0 100% no-repeat} .main3 {background: url(corner2.gif) 100% 100% no-repeat} h3 {color: #ffffff; font-family: Arial; font-size: 30px;} a:link {text-decoration: underline; color: black;} a:hover {text-decoration: underline; color: black;} a:visited {text-decoration: underline; color: black;} hr {color: white} img.ajm113 {margin-left: 30cm;} Can someone help me out here? Ok If you go to: http://www.zahra-zahra.com/innerPage.html if you hover over the side menu (sub/subcontact)which are supposed to be nested lists.. you will see some alignment issue with the pink and the brown-ish.. also the nested list was moved a bit forward so i added margin:-0.5em; but IE doesnt like it and has moved the li further back.. relevant code: PHP Code: #sideMenu { margin-top:0.2em; float:left; clear:left; width:24%; } #sideMenu ul { float:left; width:100%; list-style:none; margin:0em; padding:0em; } #sideMenu li { clear:left; background-image:url(images/site/backgrounds/sideLi.jpg); padding:0.4em; margin-bottom:0.1em; } #sideMenu ul li ul { margin:-0.5em; padding:0em; margin-top:0.3em; padding-top:0.2em; padding-bottom:0.2em; } #sideMenu ul li ul li { width:100%; background-image:url(images/site/backgrounds/sideLiLi.jpg); } #sideMenu a { text-indent:0em; text-decoration:none; color:#663333; margin-left:0em; font-size:1em; } .nestedList a { text-indent:0em; padding:0.3em; padding-left:3em; } .nestedList a:hover { background-image:url(images/site/backgrounds/sideLiLiHover.jpg); background-position: -0.4em 0em; } HTML PHP Code: <div id="sideMenu"> <ul> <li><a href="">Contact</a> <ul class="nestedList"> <li><a href="">sub</a></li> <li><a href="">SUBcontact</a></li> </ul> </li> <li><a href="">Return</a></li> <li><a href="">News</a></li> <li><a href="">FAQ</a></li> <li><a href="">bout us</a></li> <li><a href="">Home</a></li> </ul> </div> just a side question i have in the above code a nested class.. why cant i do something like .nestedList ul { } i tried that but it didnt work... I have CSS attached to a php page of which none of the CSS information gets printed. what I mean is that if we have a style "purple" which was used on the top sentence of the page, when you go to print that page, it still comes in black instead of the purple color for the purple CSS. What is worse, is that the tables that are setup and shaded for columns from the CSS style's come out without any color. It actually doesn't even print the outline borders of the table. I have read several books on CSS. For the life of me I still cant understand why some things do the things they do. For example, I still dont understand float. Even though I have read for literally hours about floats, I still dont understand why sometimes it goes one place and sometimes it goes another. Whenever I use tables, I feel as though I can place anything anywhere and know that it will always be there, regardless of the browser. For example, yesterday I spent 30 minutes reading through a tutorial about css navigation in horizonal format. I did it successfully. However, I wanted it to be centered on the page. No matter what changes I made in the CSS for the list, ul, link, etc it would not center on the page. I spent another 45 minutes trying to get it to center on the page. Once I did (wrapped the list in a DIV) then I refreshed the page and the background, which is black was through the page horizontally to each of the nav links instead of a white background like the content portion of the page. A whole new headache. I fixed that by putting the div and nav list in a table with a white background (fixed). I then check it in internet explorer and the list is not horizontal but vertical. It keep the same look of the nav list links, but is vertical. NOW I have to "hack" my CSS to make it more compliant with an older version of IE? I just don't understand why so many people think CSS is superior to tables. I understand tables were never designed for, well, designing pages, but for whatever reason, maybe because I am old school, but I find them so much easier to work with. I can never get the outcome I want with CSS and when I do it hardly ever looks the same across multiple browsers. I want to learn CSS. I want to understand why it is better. Most importantly I want to know how to code in it and if something looks wrong that I know the exact line in the CSS to work with to fix it. I am now just editing line by line to see if I get a change or outcome I want. Any suggestions? Tutorials? This is driving me nuts. Hey guys, I missed a day of my XHTML class in college and he went over most of the CSS that day, I was sick with the flu and he said that day was the most important, so I'm lost, I need to "Remove any <b>, <i>, <u> and <font> tags and replace them with inline CSS code." So i come up with something like this <Style Type="css/text"> <B style="color:blue> This is my display text </b> </style> PLEASE HELP ME WITH THIS INLINE CSS! HELP! I'M LOSTTTT! Hi, I'm looking for some help with CSS, specifically "a:visitied". I want the hover over behaviour to remain the same on html links regardless of whether or not they're already in your history. Is there a way i can do this? Many Thanks. i have just finished making a site for a collective of illustrators I belong to, and now I'm hearing back that some people are having trouble with it. It's at www.illustratorselbow.com (I'm not allowed to post a url without spaces!) & i'm hoping people might be able to have a look at it & view the source and help me out. If you click on somebody's name, you see the thumbnails on the right and the image on the left. When you compress the window, the thumbnails jump about and shrink. I want to make it so this can't happen- I'd rather that the section with the main image in it compressed a bit, or would side-scroll. Any idea how to do this? I'm pretty new to CSS too so I don't really know how to fix this. It's just a drag because on computers with smaller screens/resolutions, the thumbnails look really messy. (Bear in mind that I have extremely basic knowledge of html/css/php, i hand code rather than use dreamweaver etc, and I've never used php or css before this site. I started using it because I keep hearing that frames are bad news nowadays, but it's been sooo much trouble with my limited abilities... alas) Notice on NZBMatrix.com on the left hand side, it looks as if there were multiple boxes where normally just one navigation box would exist in a three-column layout. I already know how to do a three-column layout, but my question is, are there several different columns on the left of this website, or is it just one column with several sections defined by borders? Thank you for any advice. Have a little problem with the 3-column layout. I'm converting it down to 2-column, which should be easier. However, in all exampels I've seen, there is no need to assign height, and all of the column divs always stay the same height. I can't seem to duplicate this. Here's what I have: PHP Code: <div id="leftCol"> <p>crap</p> <p>crap</p> <p>crap</p> <p>crap</p> <p>crap</p> </div> <div style="width: 200px;"> <p>more content</p> <p>more content</p> <p>more content</p> <p>more content</p> <p>more content</p> <p>more content</p> <p>more content</p> <p>more content</p> <p>more content</p> <p>more content</p> <p>more content</p> <p>more content</p> <p>more content</p> <p>more content</p> <p>more content</p> <p>more content</p> </div> <div class="clear"> </div> and the relevant CSS: PHP Code: .clear{ /* clearing element for floats */ font-size: 0px; /* for weird IE */ height: 0px; width: 0px; clear: both; } div{ margin: 0px; padding: 0px; border: 0px black solid; } #leftCol{ width: 100px; border: 5px #000077 solid; border-top: 0px #000077 solid; margin: 0px; padding: 0px; float: left; } * html #leftcol{ /* Tan Box Hack */ width: 104px; width: 100px; } IE likes it (IE likes just about anything), but the "more content" text gets wrapped around the "leftCol" in Firefox. Any suggestions to what I'm missing? Thanks! Hi, I am trying to setup 2 columns in XHTML, and am wondering how I would get the right column to automatically begin after the left column. PHP Code: <div id="container"> <div id="leftcolumn"> <div id="leftcolumntop"> aaaa </div> <div id="leftcolumnbottom"> bbb </div> </div> <div id="rightcolumn"> <div id="rightcolumntop"> ccc </div> <div id="rightcolumnbottom"> ddd </div> </div> </div> So basically what I'm looking to do is position "rightcolumn" so it begins right after "leftcolumn". I'm not sure how to tho. Right now I'm using absolute positioning, but I'd rather have it all line up automatically rather then having to play with #'s to get it to line up every time. Hi I am new to css and am trying to use the following code to make a page. i cant seem to position the content on the right of the left nav. i want it so that the content div resizes and stays in the same position when the browser is resized but the leftnav stays in the same position and doesnt re size....any help would be appreciated. third.css body { /*sets properties for the body of the document*/ background-color:#ffffff; margin:0px 0px 0px 0px; } #container { margin-top: 50px; margin-left: 50px; margin-right: 50px; margin-bottom: 50px; padding: 0px; background-color: orange; width: 80%; min-width: 181px; } #footer { padding: 0px; position: relative; padding: 0px; background-color: yellow; width: 100%; } #content { left:200px; width:100%; background-color: red; } #leftnav { /*sets properties for the left nav bar*/ background-color : #66ccff; width: 180px; } third.html <div id="container"> container <div id="leftnav">left nav</div> <div id="content">content content content content content content content content content content content content content content content content content content </div> <div id="footer">footer</div> </div> |