CSS - Need To Remove An Couple Of Area And Expand Another
Hey all,
I'm hoping someone can help me! Basically i've been setting up this website (using e107) and the theme I am using isn't exactly what I want, there are a few pages that don't quiet work. Anyway I have tried to modify this and I have just been unsuccessful, I did manage to do a little bit but just reverted back as the chances were it wasn't right!! All I need is to remove 2 areas of the page and make the center piece fill the page. If you think you can help me reply here and ill talk to you either via IM or PM as I will have to give you login details and URLs etc Thanks, Ben Similar TutorialsFirst: I have seen: p.classname and just .classname What is the difference between the two if the latter is applied to a paragraph? Also: I have seen classes stack on top of each other like: <p class ="classname" class ="classname2">text</p> <p class = "classname" id = "idname">text</p> So is there a way to use classes with other classes id with other ids or classes and ids together like the above? On this page: http://www.mediamogulsweb.com/. I'm having a few minor issues. 1) In IE7, something is wrong with this code: Quote: #blurbs { background:52% 48% url(plus_design.jpg) no-repeat; width:615px; height:481px; margin:13px 0 10px 0; border:1px solid #000; } You'll see what I mean when you look....the 1px border is only there to illustrate the problem...it should look like it does in IE6 or Mozilla... 2) In IE6, there is some extra padding or something for these styles: Quote: #bot_left_text_box2 { width:78px; height:81px; margin:0; border:1px solid #000; } #bot_right_text_box2 { width:78px; height:81px; margin:10px 0 0 0; border:1px solid #000; } Again, you'll see it when you look... Any help is appreciated...I can;t seem to find the problem, and I'm too tired too stare at it any longer...so maybe one of you can help...thanks. Here is my css code:
Code: body { font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 12px; text-align: center; background-color: #ffffff; color: #515151; margin:0px; padding:10px; } /*page container settings*/ #page { width: 750px; height: 600px; border: 1px solid #5094F9; background-color: #FFFFFF; overflow: hidden; margin: auto; padding: 10px 10px 10px 10px; text-align: left; } /*logo header and tag settings*/ #header { margin: 0; padding-bottom: 5px; width: 450px; height: 36px; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; color: #5094F9; text-align: left; } #header img { vertical-align: -7px; } .tagline { color: #5094F9; font-size: 16; font-style: italic; font-weight: bold; display: inline; clear: both; line-height: 20px; margin-left: 10px; } /*top bar settings*/ #topbar { float: top; height: 20px; background-color: #5094f9; clear: both; padding-left: 10px; text-align: left; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; color: #FFFFFF; font-size: 12px; font-weight: bold; } #topbar a:link, #topbar a:visited { background-color: inherit; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; text-decoration: none; color: #FFFFFF; font-size: 12px; font-weight: bold; } #topbar a:hover, #topbar a:active { background-color: #FFFFFF; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; text-decoration: none; color: #5094F9; font-size: 12px; font-weight: bold; } #topbar ul { list-style: none; margin: 0; padding-top: 2px; } #topbar li { display: inline; margin-right: 160px; } #sidebar { float:left; width:140px; height: 100%; background-color: #5094F9; padding-top: 50px; padding-left:10px; padding-bottom:10px; padding-right: 10px; margin: 10px 10px 10px 0px; text-align: left; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; color: #FFFFFF; font-weight: bold; line-height: 20px; } .category { font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; color: #FFFFFF; font-size: 16px; font-weight: bold; letter-spacing: 5px; } #sidebar a:link, #sidebar a:visited { background-color: inherit; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; text-decoration: none; color: #FFFFFF; font-size: 12px; font-weight: bold; } #sidebar a:hover, #sidebar a:active { background-color: #FFFFFF; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; text-decoration: none; color: #5094F9; font-size: 12px; font-weight: bold; } #sidebar ul { list-style: none; padding: 15px 0px 15px 10px; margin: 0px; } Here is my html code: Code: <body> <div id="page"> <div id="header"><img src="images/vitalograph_spirometers_logo.gif" width="230" height="36" alt="vitalograph spirometers logo" /> <span class="tagline">world leaders in spirometry</span></div> <div id="topbar"> <ul> <li><a href="/home.html">Home</a></li> <li><a href="/about_us/about_us.html">About Us</a></li> <li><a href="/other_regions.html">Other Regions</a></li> </ul> </div> <div id="sidebar"> <span class="category">Products</span> <ul> <li><a href="/products/spirometers.html">Spirometers</a></li> <li><a href="/products/clinical_trials.html">Clinical Trials</a></li> <li><a href="/products/asthma_copd.html">Asthma & COPD</a></li> <li><a href="/products/smoking_cessation.html">Smoking Cessation</a></li> <li><a href="/products/resuscitaion.html">Resuscitation</a></li> </ul> <span class="category">Resources</span> <ul> <li><a href="/resources/contact_us.html">Contact Us/Support</a></li> <li><a href="/resources/training_services.html">Training & Services</a></li> <li><a href="/resources/exhibitions.html">Exhibitions</a></li> <li><a href="/resources/newsletters.html">Newsletters</a></li> <li><a href="/resources/downloads.html">Downloads</a></li> <li><a href="/resources/useful_links.html">Useful Links</a></li> <li><a href="/resources/industry_information.html">Industry Information</a></li> <li><a href="/resources/industry_information.html">Sitemap</a></li> </ul> </div> </div> </body> If it is more helpful - This is a link to the actual html file to view I am going to turn it into a template with an editable main section (the large blank area to the bottom right. I think my problems are all with the sidebar id - but I could be wrong as this is my first attempt at css and tabless design. Ignore the search part - that is phase 2 so I am not messing with that at this point. Here are the problems I am trying to correct: 1) I want the sidebar column to extend to the bottom of the page container - 10px. Some page containers could be longer than 600px height - but that will be the minimum height of the container. Currently it goes down all the way to the page id border with no white space. I know this is because I put in height 100% - but what I really need is something like 100% - 10px - but that doesn't seem to be an option. The page container has 10 px padding but it doesn't seem to be making a difference. 2) The left side list navigation indentation has some problems. See the side bar here to see what I want it to look like The list navigation part should be indented 20px from the left edge of the sidebar (10px more than the category class). Currently in fox fire they are both 10px from the right edge. In IE they are indented way too much. As always any help is greatly appreciated. Thanks! Two issues I could use some help on, if anyone is willing to assist: One: I'm once again finding myself at a loss to correct an odd CSS rendering anomoly that shows up (of course) only in MSIE6 and it's Mac counterpart (but more severely in IE6/Win). Basically, I'm using the negative margins method (described here in an article we probably all know on ALA). This combines neg. margins with Dan Cedarholm's Faux Columns to create a nice two-column layout with a footer that always clears regardless of which column is longer. It could be done fluidly, but this site calls for fixed width @ 760px, so it's in a viewport div. The problem is, I'd like to extend a border {1px solid #eee} between the two columns. I assumed based on my code that I would simply apply a right hand border to the content div, and that (regardless of the non-semantic wrapper div used to keep things kosher with the faux columns) that would draw the necessary line. This seems to have worked fine (with a swap of margin for padding at the bottom of the content div, to keep the area contiguous to the footer). But in IE 6, I noticed a gap at the bottom of the page even with 0 margin. I assumed I was missing somethiing obvious like a whitespace bug for it to work in everything but IE, but alas no -- I can't find the source so I'm hoping one of you pros may do what I can not. Two: Secondly, I'm having endless problems with the "Story Options" <UL>. No matter what I try, I cannot get a consistent alignment of bullet-to-list text accross browsers. Every single one is at least one pixel different. Right now is the closest I can get things to working using background images instead of list-style-image, but frankly I'm near giving up and using a character and just scrapping the custom bullet altogether. Sadly, I may have found a solution earlier but it breaks IE5/Mac which (among other problems) doesn't seem to like background-position definitions, or at least the ones I tried. I sorta need IE5 mac support even though I would otherwise not care, because the office of the content providers for this site is entirely OS9 Mac based. Ick. If anyone knows a solution to this problem off hand though, I would seriously appreciate it before I jump off the roof Here's the code: Click here to see the template. Click here for CSS. Thanks in advance. This really should be the final nail the darn coffin for this project's CSS templates. Then I can get back to the warm snuggle of PHP -- Aiden Just so I don't feel like a moron in front of the pros: I'm totally aware I should be using an inline list with :hover for the navbar, and I'm also aware how much better my unstyled content would look if I used semantic definitions for headlines and such. The reason for the former is deadline and the fact that the current system works on every browser I've tested with - more than I can say about most of this code. The second is because <Hx> spans have an inherited top/bottom margin that extends beyond style, the only way I have found to override being negative margins. Unfortunately, IE6/Win doesn't read these right and screws the whole thing. Thus, I'm using non-semantic proprietary classes for the headlines/subheads, and perfectly OK with that for this project since it works and let's me keep the ledding nice and tight the way the client wants it. 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... Ok, I am having some issues on the width of my body (I think). It displays correctly on normal size screens but on my imac there is dead space to the right. There is also two link buttons that have a picture above and below it and for some reason that makes it not clickable. I have tried the overflow:hidden option and that doesn't seem to do anything. I have attached a pic below so that you can see what I am talking about. Not sure what is going on here but if you have a minute to make some suggestions I would be very grateful! Here is my CSS. Please let me know if you see anything obvious here. body{ margin:auto; padding:0; background:#000 url(images/headBg11.png) repeat; width: 100%; } #b_Head{ width:100%; height:150px; margin:0px; padding:0px; background:url(images/headBg.gif) repeat-x; } #bg_Head{ width:934px; height:315px; margin:0 auto; padding:0px; } #logo{ width:235px; height:53px; margin:75px 0 0 110px; padding:0px; float:left; color: #fff; font-size: 46px; position: absolute; } #logo span{ font-family:Tahoma; font-size:58px; color:#297f50; font-weight:bold; line-height:50px; margin:0px; padding:0px; } #banner{ width:450px; height:156px; margin:20px 0 0 7px; padding:0; float:left; background:url(images/banner.png) no-repeat; position: absolute; color: #fff; } #b_Wrap{ width:934px; margin:auto; padding:0; background:#fff url(images/page.gif) repeat; height: 900px; } #content{ width:100%; margin:0 auto; padding:33px 0 0px 0; } .borderLeft { width:5px; height:862px; padding:0; float:left; background:url(images/bborder.png) repeat-y; } .borderRight { width:5px; height:862px; padding:0; float:right; background:url(images/bborder.png) repeat-y; } #rigtPanel{ width:218px; margin:30px 0 0 0; padding:0 0 0 10px; float:left; margin-top: 40px; } #rigtPanel .services{ width:218px; margin:0px; padding:0px; float:left} #rigtPanel .services ul li a{ width:55px !important; height:16px; margin:25px 0 0 0; /* [disabled]margin-left:5px; */ padding:0px; float:right; font-family:Arial; font-size:10px; color:#000000; line-height:14px; text-align:center; text-decoration:none; border:#bdbcbd solid 1px; background:#FFFFFF; /* [disabled]overflow: hidden; */ } #rigtPanel .services ul li a:hover{ text-decoration:none; /* [disabled]background: #cccccc; */ } #rigtPanel .services ul li .author{ width:130px; height:21px; margin:-25px 0 10px 0; padding:0px 0 0 32px; float:left; font-family:Arial; font-size:11px; color:#343434; line-height:20px; background:url(images/author.jpg) no-repeat 10px 0; } #rigtPanel .borderBottom { width:177px; height:21px; margin:-5px 0 0 0px; padding:5px 0 0 40px; float:left; background:url(images/border.png) no-repeat; } #rigtPanel .borderTop { width:177px; height:21px; margin:-25px 0 0 0px; padding:10px 0 0 40px; float:left; background:url(images/border.png) no-repeat; } #rigtPanel .services ul li .author span{font-weight:bold} Hi Everyone I am having some CSS issues with the rotator in my website in a couple Apple products. iPad 1 3.2.2 and iPhone 4.0.5. I am having trouble fixing it. I was wondering if anyone had any ideas. Please visit the following URL to see the images of the failed Apple products. http://www.webskillsplus.com/apple.html The following is a link to the website page with the issue http://www.discovermassagespa.com/index.html You can see the CSS at the following URLs http://www.discovermassagespa.com/wt-rotator.css http://www.discovermassagespa.com/css/massage.css Thanks in advance for your help. I have a page that uses CSS to handle layout. I also use a combination of CSS and javascript to create an expandable menu. I have a simplified version of this page he http://www.stringersites.com/csstest/index.htm Users of Dreamweaver will recognize this as being based on the HaloNavLeft template. As you can see, the page displays fine until you start expanding the menu items contained in <div id="mainMenu">. If you expand enough, the mainMenu box extends beyond the borders of the <div id="pagecell1"> in which it's contained. My primary question to the group is how to get the pagecell div to autoexpand along with the mainMenu div. My secondary question is how to stretch a vertical column to the height of the containing div. Specifically, this is <div class="relatedLinks">, which is contained in pageNav, which, in turn, is contained in pagecell1. The relevant pieces of CSS are included below, but you can link to the entire CSS sheet from the test doc above. Thanks in advance for the help. -Steve Stringer Code: #pagecell1{ position:absolute; top: 112px; left: 2%; right: 2%; width:95.6%; background-color: #ffffff; } #mainMenu { background-color: #EEE; border: 1px solid #CCC; color: #000; width: 350px; position: absolute; margin-left: 10px; margin-top: 20px; } #pageNav{ float: left; width:178px; padding: 0px; background-color: #F5f7f7; border-right: 1px solid #cccccc; border-bottom: 1px solid #cccccc; font: small Verdana,sans-serif; } .relatedLinks{ margin: 0px; padding: 0px 0px 10px 10px; border-bottom: 1px solid #cccccc; } God, this is really simple but I have forgotten how to get the containing box to expand Basically the text div expands but the containing div doesn't PHP Code: <div style="width: 300px; min-height: 200px; border: 1px dashed red;"> <div style="border: 0; width: 110px; height: 110px; float: left;"> <img src="#" width="100" height="80" border="0" align="left" /> </div> <div style="border: 0; width: 190px; min-height: 200px; float: right;">Lorem ipsum dolor sit amet, consectetuer adipiscing elit. In odio nibh, interdum eget, mollis quis, imperdiet non, risus. Curabitur laoreet vehicula massa. Curabitur consequat dui vitae lectus. Nam rutrum sapien id quam. Pellentesque aliquet nulla dignissim ante. Fusce metus libero, vehicula hendrerit, condimentum id, malesuada in, elit. Nam fermentum, metus in varius scelerisque, diam purus tristique tortor, vitae suscipit elit ipsum eu dolor. Ut dictum porttitor velit. Pellentesque cursus purus elementum dui. Phasellus aliquet ante vitae pede. </div> </div> I'm trying to get the footer to dynamically expand with the content in the box 1, 2, 3. How can i do this? The HTML Code: <div id="footer"> <div id="box1">Content</div> <div id="box2">Content</div> <div id="box3">Content</div> </div> The CSS Code: #footer { min-height:150px height:auto; } #box1 { float:left; min-height:150px height:auto; } #box2 { float:left; min-height:150px height:auto; } #box3 { float:left; min-height:150px height:auto; } Hi, Is there any way to set a DIV that starts at 500px height but can grow if the content inside is longer than that? Thanks. I've been searching for a few days, but I haven't found a solution to my problem. How do I get my parent DIV to expand to contain all of my content beyond the viewport? CSS: Code: html { margin: 0px; padding: 0px; height: 100%; width: 100%; min-height: 100%; } body { margin: 0px; padding: 0px; height: 100%; width: 100%; min-height: 100%; } .page { background-color: #dddddd; margin-left: -390px; border-top-width: thin; border-right-width: thin; border-bottom-width: thin; border-left-width: thin; border-right-style: solid; border-left-style: solid; border-top-color: #9CB0C0; border-right-color: #9CB0C0; border-bottom-color: #9CB0C0; border-left-color: #9CB0C0; position: absolute; height: 100%; min-height: 100%; width: 780px; left: 50%; top: 0; } .header { position: absolute; height: 158px; width: 764px; background-color: #FFFFFF; left: 7px; top: 0px; } .content { position: absolute; left: 7px; top: 159px; background-color: #9CB0C0; height: 821px; width: 764px; margin-bottom: 34px; } .footer { background-color: #415569; height: 34px; width: 764px; left: 7px; bottom: 0px; } And the HTML: Code: <?xml version="1.0" encoding="iso-8859-1"?> <!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> <title>Untitled Document</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <link href="/test.css" rel="stylesheet" type="text/css" /> <script language="JavaScript" type="text/JavaScript"> <!-- function MM_reloadPage(init) { //reloads the window if Nav4 resized if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) { document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }} else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload(); } MM_reloadPage(true); //--> </script> </head> <body> <div id="lPage" style="position:absolute; z-index:1" class="page"> <div id="lContent" style="position:absolute; z-index:2;" class="content"></div> <div id="lHeader" style="position:absolute; z-index:1" class="header"></div> <div id="lfooter" style="position:absolute; z-index:3" class="footer"></div> </div> </body> </html> I've searched through a few of the threads here, but haven't been able to find an answer either. Thanks, Brent Hi, what I'm trying to do is get two divs next to each other. That much I can do if I give them both a style of 'float:left;', but the problem with that is that they will overflow out of the div that they both sit in. Is there anyway to get two divs to sit next to each other, but to also expand the parent div if necessary? Thanks! I searched for something I want but I didn't find exactly that, or maibe something is wrong but in IE the page does not look ok. What I want is to have my page looks identical in IE as in FF or OPERA. I will explain here how I done the code PHP Code: <td rowspan="2" width="600" align="left" height="100%" valign="top" > <div class="brand_list_big"> <div class="box_header" style="background-color:#79B602;">CARS LISTED BY BRANDS</div> <div class="box_content" style="width:560px;"> <div class="brand_list_header"><span style="float:left;"><strong>Audi</strong></span><span style="float: right;">Total Cars : 2</span></div> <div class="car_list"> <span class="fleft"><a href="#">audi tt</a></span><span class="fright"><img 1><img 2></span><br> <span class="fleft"><a href="#">Saturn Sky Roadster</a></span><span class="fright"><img 1><img 2></span><br> </div> ... <div class="brand_list_header"><span style="float:left;"><strong>Alfa-Romeo</strong></span><span style="float: right;">Total Cars : 0</span></div> ... div.box_header { width: 99,5%; margin: 1px 1px 1px 1px; padding: 5px 0 5px 0; font-weight:bold; font-size: 12px; font-family:Verdana, Arial, Helvetica, sans-serif; } div.box_content { margin: 0 1px 1px 1px; padding: 5px 5px 5px 5px; height: 100%; scrollbar-face-color:#7098DF; scrollbar-highlight-color:#7098DF; scrollbar-3dlight-color:#FFFFFF; scrollbar-darkshadow-color:#FFFFFF; scrollbar-shadow-color:#919AA4; scrollbar-arrow-color:#FFCC00; scrollbar-track-color:#FFFFFF; } .brand_list_header { width: 99,5%; padding: 2px 0 2px 5px; background-color:#E3FEB1; border: 1px solid #CCCCCC; border-bottom: 0 solid #CCCCCC; margin-top: 10px; overflow:auto; /* I added this now and in ff and Opera everithing is ok, but not in IE*/ } .car_list { border: 1px solid #CCCCCC; background-color:#FFFFFF; clear:both; overflow:auto; } .fleft { float: left; margin: 2px 2px 2px 10px; clear:left; } .fright { float: right; } img.new_img { margin: 2px 10px 0 0 ; /*the img from my code( <img 1>, <img 2> ) have this class*/ } Any Ideea why in IE the divs are not ok ? First I tried to list the cars from a brand using <li> elements but I didn't know how to align the images ( icons ) at the right side, like are now. 10x in advance, waiting for a response see ya I have an absolutely position <div> with some content positioned within it. I do not always know the size of the inner content so my problem is getting the outer div to expand to the height of the inner div. Is there a solution for this with absolutely positioned items that wil work in IE/Firefox/Safari? I'm attaching a simple html file which mimics what i am trying to accomplish and the code is below: Code: <div id="detailBlock" style="position: absolute; width: 250px; height: 35px; z-index: 3; border: 1px solid #000; overflow: visible; background-color: #fff5d9; font-size: 8pt; top: 50px; left: 100px;"> <div id="closeBlock" style="position: absolute; width: 40px; height: 8px; left: 210px; top: 3px; font-size: 7pt;"><a href="javascript: closeDetail();">CLOSE</a></div> <div id="detailContent" style="position: relative; width: 240px; top: 15px; left: 5px; border: 1px solid #F00;">Content whose size i do not know...So if I write anything substantial in here it will go over the edge</div> Thanks in advance for your help. I have a div that has a table inside of it. Even though the table expands with content added, the div does not. It's important to me that the div extend with the table because this div in question has a background shadow border for the table. Here is the CSS: Code: #right { float: right; width: 80%; height: 100%; } #rt_brdr { height: 100%; width: 100%; padding-bottom:5px; padding-right: 10px; margin-bottom: 5px; vertical-align: bottom; background: url(img/r_brdr.gif) repeat-y right; } My HTML: Code: <div id="right"> <div id="rt_brdr"> <table border="0" align="left" width="100%" style="height: 93%; margin-top: 2px;" cellpadding="0" cellspacing="0"> <tr> <td class="top" style="background: url(img/w_tl.jpg) no-repeat top left #FFFFFF;"></td> <td class="white_fill"></td> <td class="top" style="background: url(img/w_tr.jpg) no-repeat top right #FFFFFF;"></td> </tr> <tr class="white_fill"> <td></td> <td></td> <td></td> </tr> <tr> <td class="bottom" style="background: url(img/w_bl.jpg) no-repeat bottom left #FFFFFF;"></td> <td class="white_fill"></td> <td class="bottom" style="background: url(img/w_br.jpg) no-repeat bottom right #FFFFFF;"></td> </tr> </table> </div> </div> I have attached a screenshot. Note that I took the content out of the table in the post so that the code doesn't extend forever. I have put a black border around the right border to make it stand out in the screenshot. Hello, i'm trying to make a tableless image gallery, each image is inside <span></span> (i don't know the dimensions of the image, it's resized by server side) while the div container expands fine, the span container does not expand to fit the image, and i also don't know how to vertically center it. i can't use <div> because images can be in the same row. Code: body { margin:0px padding:10px; background-color: #ffffff } body, div,span { font-family: Arial; font-size: 12px; color: #000000 } a { color:#000099 } a:hover { color:#0000ff } div.paging { padding:10px; border:1px solid red; } div.paging span { padding-left:10px; border:1px solid red } div.gallery { padding:10px; border:1px solid red } div.gallery span { margin:20px; border:1px solid green; } div.gallery img { border:1px solid black } this is the result http://addf.net/tests/m_g/gallery.php is float the only option? must i float every element on the page? what if it's a module for another not floated website? i'd rather not use float or a table. if you could help thank you So probably my topic title explains my problem pretty clearly, but basically I've got this div and I'd like it to expand downward as I fill a div contained within with content. Can anyone explain how I can do this? I tried placing a fairly tall picture in my inner div and right now it extends past the bottom of the outer div and looks really weird. Actually if there was even just a way I could tell the outer div exactly how tall the inner div is, that would also be fine, but I can't find a way to do this. I've tried the height: 253px; tag, but it hasn't changed anything. My outer div still doesn't go as far down the page as the inner one, so I'm left with an image thats halfway sticking out my content box. Any help would be great, thanks! I have some tables that contain a lot of columns, so the table goes beyond the users viewport. I would like the body of the page to expand to the table, anyone know of a way to get the body to expand horizontally. Below is some code, I would like the red outline to expand to the black. Code: <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <title>Insert title here</title> </head> <body style="border:1px solid red;"> <table style="border:1px solid green;width:2500px;"> <tr> <td style="">slkfdj</td> </tr> </table> </body> </html> |