CSS - 2 Separate Divs, Both Fluid, Would Like Widths To Match, Depending On Content
Hi everyone.
I have a header with a menu div inside of it with the following settings: position: absolute margin-left: 250px margin-right: auto and height... Now, below that menu, I have a sub menu - it uses the same settings, with a bigger height of course, but it is styled completely different. The idea is, I want the sub menu to be different for every page the user is on. The main menu may change, I.e., have an extra menu item in it for specific pages. So, this is what I am trying to achieve... If MAIN MENU is a longer length then SUB MENU, I would like the sub menu to be the same width. Keeping in mind that the main menu is fluid and width is not set. Now, alternatively, if the SUB MENU is longer than the main menu, I would like the main menu to be the same length as the sub menu, again, keeping in mind that the sub menu is also fluid and will change width depending on the number of menu items. I mean, I know I could just set some arbitrary width for both, something I am sure will be wide enough despite what is inside of each menu, but I'd really rather avoid doing that, I don't want them both to always be X width, rather, I want the width to be able to change, but both at the same time, not one or the other. I hope that explains what I'm trying to accomplish here, if not, please feel free to ask any questions that would help you understand what I mean better. Thank you much. Similar TutorialsI need to create a layout that is 100% width. 2 columns. The right column is 300px and and left column (content) takes up the rest. I need content to be first in the code because of float clearing. Thanks for any help! I'd like to make a 2-column layout where each column fills the height of the container div, and the container div's height is determined by the longest div within it... this is getting a bit confusing, because I can't have one being determined by the other one with that one being determined by the first, if that makes sense? Any help would be greatly appreciated, thanks I've noticed a trend in recent CSS sites with a header, content and perhaps double footer. Each of these sections has a fixed width for the content but the backgrounds for each section are liquid and each has a unique colour. I've been trying to replicate this effect on a clients site but I just can't seem to make it work. Does anyone have any ideas? This is the technique I've been using: Code: <div id="header-fluid"> <div id="header-fixed"> <div id="header"></div> <div id="nav"></div> </div><!-- head-fixed --> </div><!-- head-fluid --> Code: <div id="content-fluid"> <div id="content-fixed"> <div id="content"></div> </div><!-- content-fixed --> </div><!-- content-fluid --> Code: <div id="footer1-fluid"> <div id="footer1-fixed"> <div id="sponsors"></div> </div><!-- footer1-fixed --> </div><!-- footer1-fluid --> Code: <div id="footer2-fluid"> <div id="footer2-fixed"> <div id="copyright"></div> </div><!-- footer2-fixed --> </div><!-- footer2-fluid --> Thanks for your time on this!! Hanek Hi guys! Just wondering if this is an easy fix, otherwise I'll just switch the layout to a table. HTML: Code: <div id="box"> <div id="left"> <h1>MENU left</h1> <p>Content on the left.</p> </div> <div id="content"> <p> content... </p> </div> <div id="right"> <p>content...</p> </div> </div> CSS: Code: #box { width:750px; margin: 0px auto; padding:0px; border:1px; } #content { width:400px; padding:0px; float:left; overflow: auto; } #left { width:173px; padding:0px; float:left; background-color: #223344; border-color:white; } #right { width:173px; padding:0px; float:left; background-color: #223344; border-color:white; } I want all three columns to expand vertically to the size of the largest column. As of right now it's set up using CSS and I would prefer to keep it that way, but if switching the layout to tables would be much easier, I would be happy to do that too. Thanks for the help in advance! Ok, so I've learned to stay away from tables when you don't need them, and I have an instance where this is the case. I have a container div that has a header, content and a footer. On my home page, I have to divs next to each other with the same height and a div below them towards the right. To simplify my problem, look at this example. Code: <html> <body> <div style="float:right"> Hello there! </div> <hr> </body> </html> If there's a "float:right" on that div, the hr tag below doesn't get pushed down. But if I use relative positioning and don't use the floats, I can't put the two top divs next to each other. The other option is to use absolute positioning, but again content below doesn't get pushed down correctly. It seems that using "clear:both" works, but it seems weird that this has to be done. For example if I have floating divs in a container, I can get them to stretch out the container like so: Code: <html> <body> <div style="border: 1px solid #000; "> <div style="float:right"> Hello there!<br /> Hello there!<br /> Hello there!<br /> Hello there!<br /> Hello there!<br /> Hello there!<br /> Hello there!<br /> </div> <div style="clear: both"></div> </div> <hr> </body> </html> Am I missing something fundamental here? Is there a better solution? Thanks in advance. Link he rpisolution dot com/test/ Ok, the fixed-fluid-fixed part of the layout seems to work ok in the latest firefox and IE7 but it's broken in IE6 and possibly other versions. Could you guys take a look at the css? rpisolution dot com/test/css/style.css and see if you see what is breaking it in IE6, i thought I had put a hack that was supposed to fix the issues. btw, i know the CSS is probably ugly. sorry about that. thanks Hey, I have two columns on a site I'm working on, which are a liquid height, this works fine, the page scales the overall page height to contain all off the content. The thing is, I want column 1 to dictate the height of the page, and for column 2 to match that height and add scroll bars if needed. So far I have: Code: #wrapper { width:975px; background-image: url("../Images/main_background.jpg"); } #left_column { width:625px; float:left; padding:0px 25px 0px 25px; } #right_column { width:250px; float:right; padding:0px 25px 0px 25px; } I experimented with adding overflow:auto;, overflow:scroll; and height:inherit; to the right column, but it still stretches to contain the content in the right_column. Any ideas? Thanks guys. I'm trying to construct a complex 3-column CSS layout. I would like the center column to be fixed-width, and the outer columns to split the remainder of the document's width. All 3 columns should be able to contain centered or floated block elements and accept mouse events. Currently, I have approached this problem two nearly-successful ways. The first was to float the outer columns, but then I have no way to make them fill out. The second was to float the outer columns, then set them both to 50% with the appropriate margin set to half the width of the center column, but then I lose mouse event support in the center column because of the margins. The relevant CSS follows: Code: html { height: 100%; width: 100%; } body { margin: 0; height: 100%; width: 100%; } #left { float: left; height: 100%; /* 2nd attempt width: 50%; margin-right: 305px; */ } #right { float: right; height: 100%; /* 2nd attempt width: 50%; margin-left: 305px; */ } #center { margin: auto; height: 100%; width: 610px; } HTML-wise, the div order is #left, #right, #center. Does anyone know of a way to work around this? I'm using the CakePHP framework to build my site. I hope I'm not asking an impossible question and being since I'm new an all.. Anyways I finished a simple design well I thought it was simple anyway until I tried to make the content box to be a fluid width. Here's what it's supposed to look like. http://planet-rpg(dot)com/PR_style.png // yes I know I'm a new user.. Here's what I currently have. http://planet-rpg(dot)com Here's my coding. html Code: <?php echo $html->docType('xhtml-trans'); ?> <html> <head> <title>Planet RPG::. Imagine a creative universe : <?php echo $title_for_layout; ?></title> <?php echo $html->css('styles'); ?> </head> <body> <div id="top_bar"> <p>top bar</p> </div> <div id="body"> <div id="header"> <p>Header</p> </div> <div id="page-wrap"> <ul id="navigation"> <li class="first"><a href="/games/">Games</a></li> </ul> <div id="frame"> <div id="container"> <div id="main_content"> <p>Content area</p> </div> </div> </div> </div> </div> <div id="footer"> <p>footer coding</p> </div> </body> </html> css Code: html { background: #2b435d; } html, body { margin: 0; } body, table { color: #303030; } img { border: 0; } #body { background: #d8dde8; padding: 0 0 16px; } #page-wrap { min-width: auto; margin: 10px auto; } #frame { margin: 0 auto; padding: 0px 1170px 0px 220px; margin-top: -17px; } #main_content { background-color: #fff; } #header { background: url("../img/header.png") repeat-x bottom left; height: 64px; margin-top: 36px; } #navigation { background: url("../img/navigation.png") repeat-x bottom left; height: 31px; margin-top: -20px; font-family: "Arial", sans-serif !important; font-size: 14px; color: #fff; text-shadow:-1px -1px 0 black; list-style-type: none; padding:1px 5px 1px 220px; } #navigation li { float: left; } #navigation li a { border-left: 2px solid #303030; text-shadow:-1px -1px 0 black; color: #D0D0D0; font-size: 14px; font-weight: bold; text-decoration: none; display: block; height: 21px; padding: 6px 12px 1px; } #navigation li a:hover { color: white; text-shadow:-1px -1px 0 black; } #navigation li.first { padding-left: 236px; margin-left: -236px; text-shadow:-1px -1px 0 black; } #navigation li.first a { background: url("../img/cursor.png")bottom center no-repeat; height:24px; color: #6193c7; border: 0; text-shadow:-1px -1px 0 black; } #logo { width: 166px; height: 50px; margin-top: -32px; margin-left: 20px; position: absolute; z-index: 2; } #footer { background: #607080 url("../img/footer.png") repeat-x; height: 60px; padding: 30px 0; clear: both; } #top_bar { background: url("../img/top_bar.png") repeat-x bottom left; height: 36px; font-family: "Arial", sans-serif !important; font-size: 12px !important; font-weight: normal !important; height: 36px; position: fixed; top: 0; left: 0; right: 0; z-index: 5; } I haven't used CSS/html in awhile but if anyone can help me either "fix" the content box so it appears like mockup which would be centered on my screen as my resolution is 2560X1600(30") and just repeat the <div's> when needed. Hope someone can help me with my question. I hate to make this a forum post, as I am sure this issue comes up all the time. I've found a few blogs on this matter, but their fixes are not working for me. I am building a template @ http://curt.homelinux.com/campaign I have one main wrapper div called 'frame' that is supposed to wrap around all of the divs inside of it. All the while I had it set to a fixed height and just now realized that I need to attack this issue. Since the content will be dynamic, the 'frame' should be able to shrink and grow with the child divs. If any of you know how I can accomplish this, your help is greatly appreciated. hey all just new to layouts with CSS and having a few problems i managed to get divs to go side by side (not sure if it the best way to do it). now my content area divs are going crazy the bottom one appears on top and cuts into the navigation etc. Here is the HTML : 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>:: Reflective Web Design ::</title> <link href="rwd_style.css" rel="stylesheet" type="text/css" /> <script type="text/JavaScript"> <!-- function MM_swapImgRestore() { //v3.0 var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc; } function MM_preloadImages() { //v3.0 var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array(); var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++) if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}} } function MM_findObj(n, d) { //v4.01 var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) { d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);} if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n]; for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document); if(!x && d.getElementById) x=d.getElementById(n); return x; } function MM_swapImage() { //v3.0 var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3) if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];} } //--> </script> </head> <body onload="MM_preloadImages('images/b_home_over.jpg','images/b_news_over.jpg','images/b_bio_over.jpg','images/b_resume_over.jpg','images/b_portfolio_over.jpg','images/b_gallery_over.jpg','images/b_links_over.jpg','images/b_contact_over.jpg')"> <!-- Center Container --> <div id="center"> <!-- Banner Container --> <div id="ban_container"> <!-- Banner --> <div id="ban_left" style=float:left;clear:right><img src="images/banner_left.jpg" width="326" height="178" /></div> <div id="ban_right" style=float:left><img src="images/banner_right_top.jpg" width="650" height="87" /><img src="images/banner_right_middle_.jpg" /><img src="images/banner_right_base_.jpg" /></div> </div> <!-- Navigation --> <div id="nav" style=float:left;clear:right><img src="images/nav_side.jpg" width="24" height="279" align="left" /> <a href="home.htm" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('home','','images/b_home_over.jpg',1)"> <img src="images/b_home.jpg" alt="return to the home page" name="home" width="155" height="34" border="0" id="home" /></a><a href="news.htm" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('news','','images/b_news_over.jpg',1)"> <img src="images/b_news.jpg" alt="view the latest news" name="news" width="155" height="35" border="0" id="news" /></a><a href="bio.htm" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('bio','','images/b_bio_over.jpg',1)"> <img src="images/b_bio.jpg" alt="get to know me" name="bio" width="155" height="35" border="0" id="bio" /></a><a href="resume.htm" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('resume','','images/b_resume_over.jpg',1)"> <img src="images/b_resume.jpg" alt="check out my resume" name="resume" width="155" height="35" border="0" id="resume" /></a><a href="portfolio.htm" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('portfolio','','images/b_portfolio_over.jpg',1)"> <img src="images/b_portfolio.jpg" alt="view my web design portfolio" name="portfolio" width="155" height="35" border="0" id="portfolio" /></a> <a href="gallery.htm" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('gallery','','images/b_gallery_over.jpg',1)"><img src="images/b_gallery.jpg" alt="view my other graphical works" name="gallery" width="155" height="35" border="0" id="gallery" /> </a><a href="links.htm" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('links','','images/b_links_over.jpg',1)"> <img src="images/b_links.jpg" alt="check out some useful links" name="links" width="155" height="35" border="0" id="links" /></a><a href="contact.php" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('contact','','images/b_contact_over.jpg',1)"> <img src="images/b_contact.jpg" alt="contact me " name="contact" width="155" height="35" border="0" id="contact" /></a> <img src="images/nav_base.jpg" align="left" /> </div> <!-- Content Container --> <div id="content_container"> <!-- Content --> <div id="content_top"><img src="images/content_top.jpg" /></div> <div id="content_left" style=float:left;clear:right></div> <div id="content_area" style=float:left> <!-- Content goes here --> AAA<br /> AAA<br /> AAA<br /> AAA<br /> AAA<br /> AAA<br /> AAA<br /> AAA<br /> AAA</div> <div id="content_right"></div> <div id="content_base"></div> </div> </div> </body> </html> and the CSS: Code: body { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 11px; color: #FFFFFF; margin: 0px; padding: 0px; text-align:center; /* for IE */ background-color: #2A2A2A; } h1 { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 24px; font-weight: bold; color: #FFFFFF; } .heading2 { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 18px; color: #CCCCCC; } .heading3 { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; font-weight:bold; color: #CCCCCC; } .small { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 9px; color: #CCCCCC; } a:link { font-size: 11px; color: #FFFFFF; } a:hover { font-size: 11px; color: #66FFFF; } a:visited { font-size: 11px; color: #CCCCCC; } .barref { background-image: url(images/barref.jpg); background-repeat: repeat-x; background-position: bottom; border: 1px solid #e8eaec; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 11px; color: #FFFFFF; background-color: #454545; } .barrefbox { background-image: url(images/barref.jpg); background-repeat: repeat-x; background-position: bottom; border: 1px solid #e8eaec; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 11px; color: #FFFFFF; background-color: #161616; } #ban_left { height: 178px; width: 326px; position: relative; } div#center { margin-left: auto; margin-right: auto; width: 976px; text-align: left; position: absolute; } div#ban_right { height: 178px; width: 650px; position: relative; } div#nav { position: relative; width: 179px; height: 279px; } div#ban_container { position: relative; width: 976px; height: 178px; } div#content_container { position: relative; width: 797px; } div#content_top { position: relative; height: 35px; width: 797px; } div#content_left { position: relative; height: 100%; width: 34px; background-image: url(images/content_left.jpg); background-repeat: repeat-y; } div#content_area { background-color: #171717; position: relative; height: 100%; width: 710px; } div#content_right { background-image: url(images/content_right.jpg); position: relative; height: 100%; width: 53px; } div#content_base { background-image: url(images/content_base.jpg); background-repeat: no-repeat; background-position: top; position: relative; height: 47px; width: 797px; } If anyone has any ideas how i can get this working or optimise it, it would be greatly appreciated This error happens with firefox but in IE7 the layout seems to stay together but the left side is force to the center of the screen .... Cheers Lance Hey all, I have the following site: http://www.trshady.com All works fine but for SEO reasons along with my own desire to learn, I'm wanting to know how to change the code so that the layout stays the same, but the content of the page comes first in the code. So I have a 'topbar' div and a 'content' div. Without using absolute posistioning, how can I go about having the content div before the topbar div but still have it display the same as it currently does? Thanks for any help Hi everyone I have a 3 column layout with a footer. If the content ends up being too wide for the middle column (ie a large data table) I can't get the middle column to push the right hand column beyond the width of the screen. If the right column is absolutely positioned, the middle column just continues underneath the right column (overlaps). If the right column is floated right, it just drops down below the middle column. What I want it to do is bring up a horizontal scroll bar in the browser and let people scroll across for the right column. Based on the code below, if anyone has any ideas I would be unbelievably greatful. I've been pulling my hair out all day... My HTML is as follows: Code: <div id="content_container"> <div id="lft"> ... </div> <div id="mainbody"> .... </div> <div id="rght"> ... </div> <div id="footer"> ... </div> </div> My relevant CSS is as follows: Code: #content_container { position: relative; min-height: 100%; top: 0; left: 0; width: auto; height: auto; border: 1px solid red; } #lft { float: left; left: 0; top: 0; width: 24%; visibility: visible; } #mainbody { position: relative; left: 0; top: 0; width: 50%; height: auto; visibility: visible; } #rght { position: absolute; right: 0; top: 0; width: 22%; visibility: visible; padding-right: 10px; } #footer { float: left; bottom: 0; left: 0; top: 0; clear: both; width: 100%; margin-top: 40px; padding-top: 15px; padding-bottom: 15px; visibility: visible; } Hi, I'm racking my brain here and I can't figure out what I'm doing wrong. First of all, I have a "sidebar" div that is being pushed outside of the page, even though there is plenty of room for it in the content. http://65.175.116.253/design/demo.html I have included the CSS below, followed by the HTML and you can get the rar file for the entire layout at the following link http://65.175.116.253/design/design.rar I've been racking my head! All I want is the side bar, the two boxes way off to the right, to be floated to the right hand side of the screen, contained within the page. I can't figure out what I'm doing wrong. Can somebody look at this and tell me what I am doing wrong? I will paypal $5 to who ever figures it out.. Code: /*--- Generic Styles ---*/ body { background: #e3edc2; color: #333; font: .8em, Arial, verdana, sans-serif; margin: 0; padding:0px; } #main {width:840px; margin:18px auto 0 auto; _text-align:left;} a { color: #686397; } a img { border: 0px none; } p { margin: 0 0 1em; } .smallboldtext { font-family: verdana, helvetica, sans-serif; color: #686397; font-size: .7em; font-weight: bold; } .mediumtext { font-family: verdana, helvetica, sans-serif; color: #686397; font-size: .9em; } .mediumboldtext { font-family: verdana, helvetica, sans-serif; color: #686397; font-size: .9em; font-weight: bold; } .largetext { font-family: verdana, helvetica, sans-serif; color: #686397; font-size: 1.5em; } /*--- Header Styles ---*/ #header { margin-bottom: 1.75em; padding-top: 1px; background: #abd240; } #navbar { margin: 0; padding: 0.5em 3em; background: #686397; color: #fff; } #navbar li { display: inline; margin-right: 0.5em; padding-right: 0.75em; border-right: 1px solid #99c; font-weight: bold; } #navbar li.last { border: 0px none; } #navbar a { color: #d4ec84; text-decoration: none; } #today { text-align: right; margin-top: -1.66em; padding: 0 2em 0 0; color: #fff; line-height: 1; } /*--- Content Styles ---*/ #content { float: left; padding: 0 20em 4em 3em; width: 100%; } #content h1 { background: #fff; color: #686397; font-size: 1.5em; margin: 0 33% 1.25em -2em; padding: 0.4em 2em; } #content h1 b { color: #b0d742; } #content h2 { margin: 0.5em 0; padding-bottom: 0.25em; border-bottom: 1px solid #b0d742; font-size: 1.5em; } /*--- Content Styles ---*/ table.basic { border: 0px; width: 100%; border-collapse: collapse; } table.basicborder { border: 2px solid #b0d742; width: 505px; border-collapse: collapse; } table.mainsearch { border: 2px solid #b0d742; width: 415px; border-collapse: collapse; } /*--- Sidebar Styles ---*/ #sidebar { float: left; width: 17em; margin: 0 0 4em -18em; /* this creates a mathematical layout width of -1 */ } #sidebar div h3{ background: #9b96ca; } #sidebar form_div { margin: 0; padding: 0.8em; } #sidebar div{ background: #3a3c2d; color: #fff; padding: 0 1em 1em; margin-top: 0.75em; } #sidebar div h3{ font-size: 1.25em; margin: 0 -0.8em; padding: 0.4em 0.8em; text-transform: lowercase; } #whatiscompany h4{ margin: 0 0 0.5em; padding: 0.5em 0; border-bottom: 1px solid #fff; font-weight: normal; } #whatiscompany p:first-line{ font-style: italic; } /*--- Footer Styles ---*/ #footer { clear: both; padding: 1.5em 3em; background: #a0c63a; height: 15px; } #footer p { margin: .1em; } #footer a { color: #333; text-decoration: underline; } ------------------------------------------------------- Code: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <title>www.company.com/</title> <link href="css.css" type="text/css" rel="stylesheet" media="screen"> <!--[if IE]> <style type="text/css"> #today{ text-align: right; margin-top: 0; margin-bottom: 0; padding: 0 2em 0 0; position: relative; top: -1.66em; color: #fff; font-weight: bold; line-height: 1; } </style> <![endif]--> </head> <body> <!-- mockup, adding borders | markup, using float for layout (or the appropriate section) --> <div id="header"> <img src="logo.jpg" alt="a link to the home page" width="231" height="52"> <ul id="navbar"> <li class="first"> <a href="http://www.company.com">nav link</a></li> <li><a href="http://www.company.com">nav link</a></li> <li><a href="http://www.company.com">nav link</a></li> <li><a href="http://www.company.com">nav link</a></li> <li><a href="http://www.company.com">nav link</a></li> <li><a href="http://www.company.com">nav link</a></li> <li><a href="http://www.company.com">nav link</a></li> <li class="last"><a href="http://www.company.com">nav link</a></li> </ul> <p id="today">date here</p> </div> <!-- end div id header --> <div id="content"> <h1><b>home:</b> search</h1> <img src="flash.jpg"><br> <h2>quick search</h2> <table class="mainsearch"> <tr> <td> <FORM action="http://company.com/" method="post"> <input type="radio" name="quicksearch"><span class="smallboldtext">title</span> <br> <input type="radio" name="quicksearch"><span class="smallboldtext">title</span> <br> <input type="radio" name="quicksearch"><span class="smallboldtext">title</span> <br> <input type="radio" name="quicksearch"><span class="smallboldtext">title</span> <br> <input type="radio" name="quicksearch"><span class="smallboldtext">title</span> <br> <input type="radio" name="quicksearch"><span class="smallboldtext">title</span> <br> <input type="radio" name="quicksearch"><span class="smallboldtext">title</span> <br> </td> <td width="285" valign="top"> <br> <span class="smallboldtext">Keywords - </span><input type="Text" name="keywords" size="25"> <br> <span class="smallboldtext">Within - </span><select name="distance"> <option value="50" > 50 </option> <option value="Any" > Any </option> <option value="1" > 1 </option> <option value="5" > 5 </option> </select> <select name="distance_measure"> <option value="Miles" > Miles </option> <option value="kilometers" > Kilometers </option> </select> <span class="smallboldtext">of</span> <br> <span class="smallboldtext">City & State or Zip - </span> <input type="Text" name="zip" size="15"> <br> <center> <input type="submit" name="search" value="search"> </center> </FORM> </td> </tr> </table> </div> <!-- end div id content --> <div id="sidebar"> <div id="whatiscompany"> <h3>what is company.com?</h3> <h4>www.company.com</h4> <p> This is simply example text that goes here. Sample example text is in this place. You can read the sample text here it is. <br> </p> </div> <!-- end div id whatistea --> <div id="loginsidebar"> <h3>login</h3> <br> <form action="http://company.com" method="post" name="login"> <p> Username - <INPUT type="Text" name="member_user_name" size="12"> <br> Password - <INPUT type="password" name="member_password_a" size="12"> <INPUT type="submit" name="submit" value="login" > </FORM> <br> <a href="http://company.com">Forget Your Password?</a> <br> <br> </p> </div> <!-- end div id loginsidebar --> </div> <!-- end div id sidebar --> <div id="footer"> <p> - <a href="http://company.com">nav link</a> - <a href="http://company.com">nav link</a> - <a href="http://company.com">nav link</a> - <a href="http://company.com">nav link</a> - <a href="http://company.com">nav link</a> - <a href="http://company.com">nav link</a> - <a href="http://company.com">nav link</a> - <a href="http://company.com">nav link</a> - <a href="http://company.com">nav link</a> - <a href="http://company.com">nav link</a> - <a href="http://company.com">nav link</a> - </p> </div> <!-- end div id footer --> </body> </html> I have a container div which includes a #header div, a left-floated #content div, a #right div, and a #footer div. The #content div has a background image that does not want to extend all the way down within the div to snuggly join the footer in any IE browser. I've tried the Holly hack, adding a line-height, relative positioning but to no avail. The stylesheet is embedded in the html file. Here's the link: http://www.emaycreations.net/BuildWebsiteIII/Week6/finalexamPractice.html It looks great in NN, FF and Opera but neither IE 5 nor 6 displays the page correctly. Can anyone help? Mari-Anne in Montana q)When creating webpages with css , are you supposed to use pixels or % for page widths? If I use pixels then i create for a 800X600 screen only, but it won't look messy when screen resized which I prefer. For some reason beyond me, my site displays perfectly in firefox, and opera. the width of the wrap which is supposed to be 1068 (I think off memory..) and in browsers such as chrome, ie8, and safari the wrap takes up the entire length of the screenn instead of that 1068. I tried zooming out to see if it was that issue and its not. My code is valid html/css and its not just some IE bug. Any help would be appreciated. www.devwebsites.com Thanks. I am having trouble trying to get the divs following my first left hand menu to all stay the same width but it is not working. When I set the first div width which contains the Javascript menu on the left, I cannot set the following div (which is going to contain CSS highlighted links) to go to 20% width so it is the same as the first div with the menu in it. here is the link to my page so you can see what I mean. http://kevinobrien.ca this is what I have in the style sheet so far for that side. If I add the width to div#sidebar2 it does not stretch that part but rather narrows it and messes it up div#sidebar {display: block; position: absolute; top: 5.4em; left: .4em; width: 20%; padding: 0; margin-left: .5em; border: 1px solid #335; margin-top: 2em;} div#sidebar2 {position: absolute; border: 1px solid #335; margin-top: 1em;} any help with this is greatly appreciated K.O. It has been a long day and tomorrow will be a longer. I give up trying to fix my problem and searching. So, that leads me here, where I will ask my question and once again receive the n00b stamp on my head. I hate css... but love it so. go to church css file Now why the heck does IE not give a crap about the width I set. increase the text size(ctrl+scrollWheelUp) and you will see that it is acting like an auto width. It is the same if I switch between % em pt px. Firefox views it just fine expect for the inner box going outside it's container on the navbar. Oh and the lists are shifted over to the right and the text goes outside the box and doesn't wrap inside. List problem with IE before and I fixed it only for it to show up in firefox. These are probably easy fixes but I am too tired right now and know I will not have time in the next couple of days to mess around. So, answer me up please. Bonus points for posting a link to a topic that all ready covers this that I blatantly missed. Sorry for the banner(too big file). The whole banner/header top will change but the navbar and content area concept is going to stay almost like it is so I need ot firgure this out. |