CSS - Band On Right Hand Side
Hi all
i am making a site for some family friends they want it to be 1024 i think i have set up the dimensions correctly but i cant find where the extra bar on the side is coming from, I am only a beginner that knows some basics. any help would be appreciated. any ideas? redochreworkshop.com.au css, there is probably alot of redundant code because i used a template Code: body { padding: 0; font: 76% Verdana,Tahoma,Arial,sans-serif; background-color: #211d1e; background-image: url(images/Background2.gif); background-repeat: no-repeat; position: relative; display: inline-block; margin-left: 0px; margin-right: 0px; background-position: centre centre; margin-top: 0px; } #wrap { background: #FFFFFF; color: #ffffff; border: solid black 2px; width: 700px; height: 1100px; margin-left: 162px; margin-right: auto; position: centre centre; display: inline-block; } #header { clear: both; margin: 0px 0em 0px 0em; padding: 0; height: 0px; background-color: #FFF; } #header h3 { width: 350px; margin: 0px 0px 0px 15px; float: left; height: 275px; } #header p { width: 500px; float: right; text-align: center; color: #a0a0a0; margin: 0px 0px 0px 0px; font-size: 0.8em; line-height: 1.2em; height: 35px;} #avmenu { clear: left; float: none; width: 150px; margin: 0 0 10px 0; padding: 0; font-size: 0.9em; } #avmenu ul { list-style: none; width: 150px; margin: 0 0 0 0; padding: 0; font-size: 2em; } #avmenu li { margin-bottom: 4px; } #avmenu li a { font-weight: bold; height: 40px; text-decoration: none; color: #fffff1; display: block; background: #67522c; border-left: 1px #846837 solid; } #avmenu li a:hover { background: #67522c; color: #fffff1; font-family: Chiller; } .announce { margin: 10px 0 10px 0; padding: 10px; width: 130px; color: #a8a8a8; background-color: #FFFFFF; line-height: 1.3em; } #extras { float: right; width: 150px; margin: 0 0 10px 0; padding: 0; font-size: 0.9em; line-height: 1.5em; height: 400px; } #extras p { margin: 0 0 1.5em 0; } #content { padding: 0 10px 0 10px; line-height: 1em; text-align: left; margin: 0px 160px 20px 160px; } #content h2 { font-size: 1.5em; margin: 0 0 0.5em 0; } #content img { padding: 0px; display:inline; } h3 { font-size: 1.3em; margin: 0 0 10px 0; } a { text-decoration: none; color: #b6952a; } a:hover { text-decoration: underline; color: #b6952a; } #footer { clear: both; margin: 0 auto; padding: 40px 0em 0px 0em; width: 700px; text-align: center; color: #808080; font-size: 0.9em; height: 20px; border: none; } #footer a { color: #808080; text-decoration: none; } #footer a:hover { text-decoration: underline; } .left { margin: 0px 7px 0px 5px; float: left; } .right { margin: 0px 7px 0px 5px; float: right; } .textright { text-align: right; } .center { text-align: center; } .small { font-size: 0.8em; } .bold { font-weight: bold; } .hide { display: none; } Similar TutorialsHello All, I'm not too savvy with CSS, so please pardon if this seems uber easy. I have started to use Google AdSense on my web pages ( I wish I could show you an example on my website, but I am not allowed to post a URL on the forum), In Firefox, it shows the main content on the left hand side and the Ads on the right hand side in a columnar format, however, there is no word wrapping going on. In Internet Explorer, the AdSense shows at the top right and then below that my content starts. Here is what I have in my HTML in a single TD Cell: [div class="google120rightbanner"] [script type="text/javascript"][!-- google_ad_client = "myAdSenseID"; google_alternate_ad_url = "(Alternate Adsense URL)"; google_ad_width = 120; google_ad_height = 240; google_ad_format = "120x240_as"; google_ad_type = "text"; google_ad_channel = ""; google_color_border = "FFFFFF"; google_color_bg = "FFFFFF"; google_color_link = "0000FF"; google_color_text = "000000"; google_color_url = "008000"; //--] [/script] [script type="text/javascript" src="(Javascript URL Location)"] [/script] [/div] [!-- Show my main content --] [div id="ContentPane" runat="server" style="padding-left:2px;"][/div] [!-- End my main content --] [div class="clear"][/div] This is what I have in my CSS: .google120rightbanner [ width: 122px; margin: 15px 10px 5px 10px; float: right; /*allows main content to wrap around the google ad */ /*note: after this we need to use the clear class to clear the float at end of container */ ] .clear [ clear: both; ] NOTE: I have changed the brackets so I can display this message on the forums. Does anyone have any idea what I am doing wrong here in getting the display I want using this CSS? Again, I'm not very savvy about this, so a good explanation would be helpful. Thank you all very much! Mark Gordon I also am having this problem with the menu in IE6 - the right hand side of the menu dropdown, "Videos", is also showing up on the left hand side, slightly cut off. I know it's "Videos" because when I hover over Videos, the text on the left hand side ("os") also lights up. Is it possible that -999em is not far enough over? What could be the problem/how can I fix this? A related problem, perhaps, is that the first below-menu item starts about 20px below where it should be. I'm new to CSS programming and I'm not too sure what's going on. image showing what the issue is at kburke dot org slash menuleft.jpg - I don't have enough posts to link an image. I really appreciate your help. The menu's in a 980px wide container. Some of the site's still in tables but I'm working on changing that. #nav, #nav ul { padding: 0; margin: 0; list-style: none; float:left; width:89.091em; list-style:none; line-height:1; background:#b6791e; font:11px Verdana, sans-serif; font-weight:bold; padding:0; margin:0 0 .5em 0; } #nav a { display: block; width: 11.1em; w\idth: 10.1em; color: #FFFFFF; text-decoration: none; padding: 0.75em 0.5em; } #nav a.daddy { } #nav li { float: left; padding: 0; width: 11.1em; position:relative; } #nav li ul { position: absolute; left: -999em; height:auto; width: 14.7em; w\idth: 14.5em; font-weight: bold; margin: 0; padding:0; background:#FFFFFF; color:#769841; border: 0.1em solid #769841; } #nav li ul a:hover{ color:#ffff30; background:#769841; } #nav li ul li a{ color:#769841; } #nav li li { padding-right: 1em; width: 14.5em; w\idth:13.5em; } #nav li:hover ul { left: auto; } #nav li a:hover, nav li.sfhover a:hover{ color:#FFFF30; } #nav li ul li a:hover { color:#FFFF30; } #nav li:hover ul, #nav li.sfhover ul { left: auto; clear:both; } #nav li ul ul { margin: -3.3em 0 0 5em; } #nav li:hover, #nav li.sfhover { background: #769841; } #nav li a:hover, #nav li.sfhover a:hover{ color: #ffff30; } #nav li ul a{ color:#769841; padding:.4em; } I am having problems making the comments and upcoming shows show up. I want the friends and shows to show up under the first group of divisions div 5 and 6 - And I want the comments where the friends are now. Also I can not get anything that I embed to show up. I know it is because of the code to make the myspace music player play at the very end. I need the myspace music player there but I also want to embed my podcast and snowcap music player. Please help me out. Thanks. Click here to see page Here is my code: Code: <style type="text/css"> body table {margin-top:-5000px;} body td table, body div table {margin-top: 0;} table, tr, td {background-color:transparent;} body div table form{display:none;} body table div form{display:block;} div table td font {visibility:visible;} a.navbar:active, a.navbar:visited, a.navbar:link { color:ffffff; } a.navbar:hover {color:ff0000} .navbar{display: inline;} a:active, a:visited, a:link, a:hover{ color:79889B; } .blacktext10, table, tr, td, li, p, div { color:79889B; } {text} div, font, input, textarea, td{font-family:arial narrow !important;font-size:10pt !important;text- bold! color:ffffff; !important;} .comt td, .comt table{width:0px!important; height:0px!important; background-color:transparent!important; border:0px!important; _padding:2px!important;} .comt .comt td, .comt table, .comt td a img, .comt td td td a, .comt td b a, .comt td .redlink{visibility:visible;} .comt td td td b{top:0px; display:inline;} .comt .orangetext15, .rid{display:none;} .comt td b, .blacktext10 {display:block;} .comt table, .comt td b, .comt .btext, .redlink{position:relative; top:-9px;} .comt {z-index:7;} body { background-color:000000; background-image:url(); background-repeat: no-repeat; background-attachment: fixed; background-position: center; scrollbar-face-color:000000; scrollbar-3dlight-color:000000; scrollbar-shadow-color:000000; scrollbar-darkshadow-color:000000; scrollbar-arrow-color:79889B; scrollbar-track-color:000000; } .banner { background-color: 000000; background-image: url('(URL address blocked: See forum rules)); background-repeat: no-repeat; background-attachment: scroll; background-position: center; position: absolute; left: 50%; margin-left: -486px; top: 177px; height: 137px; width: 965px; border: 0px; overflow: auto; z-index: 1; } .div1 { background-color:000000; color:000000; background-image:url((URL address blocked: See forum rules)); border:1px ridge; border-color:888888; width:250px; height:1050px; overflow:auto; position:absolute; z-index:2; left:50%; top:0%; margin-left:-485px; margin-top:315px; visibility:visible;} .div2 { background-color:000000; color:000000; background-image:url((URL address blocked: See forum rules)); border:1px ridge; border-color:888888; width:453px; height:350px; overflow:auto; position:absolute; z-index:2; left:50%; top:0%; margin-left:-230px; margin-top:315px; visibility:visible;} .div4 { background-color:000000; color:000000; background-image:url((URL address blocked: See forum rules)); border:0px ridge; border-color:888888; width:448px; height:340px; overflow:auto; position:absolute; z-index:2; left:50%; top:0%; padding: 4px; margin-left:-228px; margin-top:1023px; visibility:visible;} .div3 { background-color:000000; color:000000; background-image:url((URL address blocked: See forum rules)); border:1px ridge; border-color:888888; width:250px; height:1050px; overflow:auto; position:absolute; z-index:2; left:50%; top:0%; margin-left:228px; margin-top:315px; visibility:visible;} .comt td, .comt table { width:0px!important; height:0px!important; background-color:000000!important; border:0px!important; _padding:2px!important;} .comt .comt td, .comt table, .comt td a img, .comt td td td a, .comt td b a, .comt td .redlink{visibility:visible;} .comt td td td b{top:1375px; display:inline;} .comt .orangetext15, .rid{display:none !important;} .comt td b, .blacktext10 {display:block;} .comt table, .comt td b, .comt .btext, .redlink { position:relative; top:-9px;} .comt {z-index:7;} .orangetext15 { visibility:hidden;} .comt { position:absolute; width:965px; height:300px; overflow:auto; background-color:000000; border: 1px solid gray; top:1375px; left:50%; margin-left:-486px; } .blacktext10 {display:none;} .comt { scrollbar-face-color:000000; scrollbar-face-color:000000; scrollbar-highlight-color:999999; scrollbar-3dlight-color:000000; scrollbar-shadow-color:006633; scrollbar-darkshadow-color:000000; scrollbar-arrow-color:00FF00; scrollbar-track-color:000000;} .comt td, .comt span { !important; font-family: !important; color:FF0000 !important; } .comt a {color:FF0000 !important; !important; font-family:Majandra GD !important; text-decoration:none !important;} .comt a:hover {color:FFff00 !important; !important; font-family:Majandra GD !important;} a img {border:0px !important;} </style> <div class="banner"> </div> <div class="div1"><center><br><br><font color="yellow"><b>Booking Information:<br>Critical Mass Music<br>J Barre<br>(404) 644-4742</b><br></font><center><a href="mailto:ebrowne77@gmail.com"><font color="yellow"><b>ebrowne77@gmail.com</b></font></a></center><br><br> <a href=(URL address blocked: See forum rules)=invite.addfriend_verify&friendID=110852663> <img src="(URL address blocked: See forum rules)" width="125" height="58" border="0"> </a> <br> <a href=(URL address blocked: See forum rules)=user&Mytoken=4DD43AA2-63F5-4D5E-B503AFA03396064621867986> <img src="(URL address blocked: See forum rules)" width="125" height="58" border="0"> </a> <br> <a href=(URL address blocked: See forum rules)=user.viewPicture&friendID=110852663> <img src="(URL address blocked: See forum rules)" width="125" height="58" border="0"> </a> <BR> <a href=(URL address blocked: See forum rules)=mail.message&friendID=110852663> <img src="(URL address blocked: See forum rules)" width="125" height="58" border="0"> </a> <BR> <a href=(URL address blocked: See forum rules)=user.viewfriends&friendID=110852663> <img src="(URL address blocked: See forum rules)" width="125" height="58" border="0"> </a><br> <a href=(URL address blocked: See forum rules)=bandprofile.listAllShows&friendid=110852663&n=J+Barre> <img src="(URL address blocked: See forum rules)" width="125" height="58" border="0"> </a><br> <a href=(URL address blocked: See forum rules)=user.addToFavorite&friendID=110852663&public=0> <img src="(URL address blocked: See forum rules)" width="125" height="58" border="0"> </a><br> <a href=(URL address blocked: See forum rules)=block.blockUser&userID=110852663> <img src="(URL address blocked: See forum rules)" width="125" height="58" border="0"</a> <BR> <a href=(URL address blocked: See forum rules)=user.viewComments&friendID=110852663&MyToken=f7d8ef58-6dd3-4d2d-b3b4-d1394c2aec1a> <img src="(URL address blocked: See forum rules)" width="125" height="58" border="0"> </a> <BR> <a href=(URL address blocked: See forum rules)=vids.myvideos> <img src="(URL address blocked: See forum rules)" width="125" height="58" border="0"> </a> <BR> <a href="(URL address blocked: See forum rules)" target="new"> <img src="(URL address blocked: See forum rules)" width="125" height="58" border="0"> </a> <BR> <a href="mailto:ebrowne77@gmail.com"> <img src="(URL address blocked: See forum rules)" width="125" height="58" border="0"> </a> <BR> <a href="(URL address blocked: See forum rules)=music&Mytoken=1232584F-A394-483A-99869640B802D9BD2832516" target="new"> <img src="(URL address blocked: See forum rules)" width="160" height="58" border="0"> </a></font> <br><br><br> <BR> <a href="(URL address blocked: See forum rules)~117127" target="new"> <img src="(URL address blocked: See forum rules)" width="125" height="58" border="0"> </a> </div> <div class="div2"> <font size=2><b><font color=ffffff> </font></div> <div class="div3"><font color=ffffff> <center><font color="yellow">J Barre</font></center> <br> <center> <img src="(URL address blocked: See forum rules)" width="100" height="250"> <br> <center><font color="yellow">Atlanta, GA <br> "A Lone Stallion Amongst Mules!"</font></center><center><br><br> Comment Here<form method="post" action="(URL address blocked: See forum rules)=user.ConfirmComment"><input name="friendID" value="57340028" type="hidden"><textarea name="f_comments" style="width: 150px; height: 100px; background-color: FFFFFF; color: 000000; font-family: arial; font-size: 10px; border: 1px solid 000000; ">Holla at Your BOY!!! </textarea><br /><input type="submit" value="Post" /></form><br><a href="(URL address blocked: See forum rules)=user.viewComments&friendID=110852663" target=_blank>View/Edit Comments</a></center> <BR> <center><A href="(URL address blocked: See forum rules)" target="new"><img border="0" src="(URL address blocked: See forum rules)" width="180" height="20"></A> </center> <br><br> <center><a href="(URL address blocked: See forum rules)=3091027"><img src="(URL address blocked: See forum rules)" border="0"></a></center><br> </div> <div class="div4"> <center><img src="(URL address blocked: See forum rules)"> <br></center> <div style="text-align:justify; text-justify:distribute-all-lines;> <font size=2><b><font size="2" color="red">Hailing from Tulsa, Oklahoma, the man formerly known as "E.B." or "Encyclopedia Brown," is blazing a trail in hip-hop back to its essence: originality, thought, and struggle. Many are saying his timing couldn't be better. Heavily influenced by hip-hop, while it was still in his infancy, J Barre was founding member of the Def Boy breakin' crew. Soon after, he began honing his skills as a beat boxer which sparked his ambition to become an emcee. His first recording goes back to the age of 9. He developed his charismatic stage presence and experience from numerous talent shows and mic battles. After attending Howard University in DC, he went back home to Tulsa,OK and helped to form and establish the underground super group Medu Netr in 1998. Grindin' and building his technique and further feeding his passion for hip-hop, J Barre became one of the most seasoned and well known MCs in Oklahoma. Migrating to Atlanta, GA in 2002, J Barre set out to get his skills marketed in the right direction. J Barre has performed in Harlem, New York to L.A., California and is currently preparing for a promotional tour for his freshman solo project due out Summer 2007. His determination to preserve the traditions of hip-hop, and his raw talent, help him easily exceed competitors...he is a lone stallion amongst mules.</div> </font></div> <style>td td object {position:absolute;left:272px; top:672px;}</style> </td></tr></table></td></tr></table> <div class="comt"><table class="off"><tr><td><table><tr><td> Thanks for taking time to read my question. How do I position 3 pictures beside eachother with no spaces between them? (so they look like one continuous picture) eg: ______ |1|2|3| |_|_|_| instead of ________ |1||2||3| |_||_||_| Thanks, Brad Hi, I'm having a slight problem with my css. I want to display a comment with a number of images to the right of it. e.g "Excellent" plus 5 stars next to it (note: images of stars) so i tried this: Code: <div id = "commentText"> Excellent </div> <div id = "star"> </div> <div id = "star"> </div> <div id = "star"> </div> <div id = "commentText"> Fantastic </div> <div id = "star"> </div> <div id = "star"> </div> <div id = "star"> </div> <div id = "star"> </div> css Code: #commentText { font-size: 100%; color: #000000; font-family: Verdana, Arial, Helvetica, sans-serif; font-weight: normal; padding-left: 30px; } #star { display: inline; height: 24px; background-image: url(images/star.png); background-repeat: no-repeat; padding-left: 20px; } I currently have comment with 3 stars displayed underneath it - however they are only half being shown for some reason. Any help is appreciated to help me get the desired effect. Thanks! Hi. I'm a design student working on a website for my boss, and I've come across a problem and was wondering if someone could help me out. It might be a simple fix, but I can't seem to figure it out. I have a body wrapper div (subtitle, body text, etc) on the left that's approx. 705 px wide and a vertical navigation bar div on the right that's about 240 px wide. I've tried floating the body wrapper left and the navigation buttons right, but one always ends up sitting below the end of the other. When I use the "clear right" or "clear left" commands, it doesn't help. Any ideas what I could do to get them to line up on the top? I want them to sit next to one another. Thank you very much for any ideas! Britta Hi. I've a div container with a gray bg color then inside I've two DIV (left & right). It works on IE but on firefox the bg color the the two DIV is white and if I add bg color=GRAY for the 2 DIV the middle is white. And I don't want to put bg color on the class = left and right because if I want to reuse these with other stuff then the color won't match to other things. How can I fix this problem? Please take a look at the following link with IE & firefox and u know what I mean. Please take a look at source code or in here. Thank you!!! http://yourbestproduct.com/test.html CSS CODE: body { text-align: center; } #container { width: 800px; margin: 0 auto; } #sub_title { background-color: #E6E6E6; background-repeat: repeat; padding: 2px; width: 796px; color: #848484; } .left { float : left; margin-left: 10px; } .right { float : right; margin-right: 10px; } HTML CODE: <div id="container"> <div id="sub_title"> <div class="left">Left Message</div> <div class="right">Right Message</div> </div> </div> Hi! I want to have let's say 4 divs of width:25% horizontally side-by-side. Ex: (I'll ry to draw it ) | | | | | | | | | | | | | | | Thank you. Alright, I run a joomla site and im working on making a 100% tableless xhtml compliant template. I'm very new at this so im trying my best to learn. I used the Lean version of skidoo's layout as the base and then added all the appropriate php tags needed to make it a joomla template. For the one part I need two modules to load right next to each other near the top of the page to mimic the table version of the Latest News and Popular Modules. I'll show you code snipits of how I did it. Code: html: <div id="contentColumn"> <div class="inside"> <!-- middle column content begin --> <p class="blocktext"> <?php mosLoadModules( 'banner', -1 ); ?> </p> <div id="users"> <?php mosLoadModules ( 'user1' ); ?> </div> <div id="users"> <?php mosLoadModules ( 'user2' ); ?> </div> <p> <div id="nofloat"> <?php mosLoadModules ( 'top' ); ?> <?php mosMainBody(); ?> <?php mosLoadModules ( 'bottom' ); ?> </div> css: /*top users */ #users { float:left; width: 300px; } #nofloat { float: none; } So anyways this does indeed put each div tag side by side but my problem is that I need the following PHP code ( <?php mosLoadModules ( 'top' ); ?> <?php mosMainBody(); ?> <?php mosLoadModules ( 'bottom' ); ?>) to return to the next line after the div's, but instead it jumps everything to the right and breaks the template. So I added the nofloat css and that fixed it and put the rest of the content below the side by side div's but now it doesn't work in FireFox. Now I tried padding-top and that worked in both browsers, but its not flexible as the side by side div modules are not always there and I don't want 200px of white space on the pages that don't show it. Also as a side note I tried putting <?php mosLoadModules ( 'user1' ); ?> and user2 into separate div tags that that floated left and right but it had the same outcome, so I stuck with one float left that seems to work the same. My question is what can I do to make this content show after the side by side div's and not beside it in both browsers? You can see what I mean by looking at this test site in both IE 6 and FireFox. http://www.wii-volution.com/testbed/ Thanks for any help you guys can give me! Hi Guys, I'm working on a form, and for the life of me, I can't get these divs to sit side by side. You can see the test page at www.details.at/search_test.cfm It's a small form with a few fields and selects I want each element to sit side by side in a single row. Here is the code. I thought display:inline; would do the trick, but it's not working. Code: <style> #control_panel { padding:0 0 1em 2em; width:600px; float:left; } .smalltext { font-family: arial, helvetica, sans-serif; color: #000000; font-size: .7em; } .input { font: .9em Arial, Helvetica, sans-serif; background-color: #FFFFFF; color: #146eb4; border: 1px solid #146eb4; } label { text-align: left; display: block; } div.search_cell { display: inline; } </style> <div id="control_panel"> <form action="http://test.at" METHOD="post"> <div class="search_cell"> <INPUT class="input" NAME="search_box" value="" size="25" maxlength="200"> <label for="search_box"><span class="smalltext">search</span></label> </div> <div class="search_cell"> <select class="input" name="range"> <option value="50">50</option> <option value="Any">Any</option> <option value="1" >1</option> </select> <label for="search_box"><span class="smalltext">within</span></label> </div> <div class="search_cell"> <select class="input" name="range_measure"> <option value="Miles">Miles</option> <option value="kilometers">Kilometers</option> </select> <label for="search_box"><span class="smalltext">range</span></label> </div> <div class="search_cell"> <span class="smalltext">of</span> </div> <div class="search_cell"> <INPUT class="input" value="" type="Text" name="location" size="10"> <label for="location"><span class="smalltext">city & state or postal</span></label> </div> <div class="search_cell"> <INPUT class="input" type="submit" name="Submit" value="Go"> </div> </form> </div> </div> I'm working on a site which has a header and footer div, and in the main section in between, it has a narrow left div and main content to the right. I've got the overall width centered at 90%, and I want the left div to be 250px wide, and then the right main content div to be the remaining width of the 90%. I also want to make sure it doesn't resize below about 600px when the screen is resized. Am I better off setting a fixed width of the overall width instead of a percentage? That way I can make the page about 800px wide, left pane 250px, and main content 550px? Any other thoughts? Thanks. So I'm not really new to CSS or HTML though I might as well be considering the last time I did anything in either that had much substance was a class back in high school, about 6 years ago. This is what I want... DIV1 --------------- DIV2 --------------- DIV 3 2 would be in the center with 1 and 3 floating left and right respectively. Instead I'm getting this... DIV1 --- DIV2 ----------------------------------------- DIV 3 or DIV1 DIV2 DIV3 ...I hope you guys get the idea. I'm having trouble figuring it out. My ext CSS sheet, if you care to look, is he http:// livingway.110mb. com/mainstyle.css the frame in question, he http:// livingway.110mb. com/main.htm I'm hoping it'll let you all look at them. It's nothing professional yet because I'm only trying to give an update idea to our "webmaster". Anywho, let me know what I'm doing wrong. My brain hurts right now. Hey guys! Usually if you make a table and then make another table, the other table will be located below the table before. I want them to be side by side. So I tried this CSS value : table { display : inline; } then it worked, but the problem is, that if the tables have different sizes, the smaller one is not aligned to the top and looks smaller than the table before it. I want them all to be aligned to the top. I tried vertical-align:top and valign="top", but they still don't work... Is there any other way to make tables have no line breaks before and after the table? Is there any other property that controls the line breaks of the table? I tried display:table-cell , but the problem is still the same. thanks I've been having some issues getting a design for a site I'm co-authoring to display correctly using CSS. I know that what I'm trying to do should be possible, but I haven't been able to figure it out and am getting pretty damn frustrated with the whole thing. I could probably do it with tables, and right now I have it set up with some javascript that I threw together, but css+divs would be the ideal solution. Anyways, this is basically what I want to try and do (that's the javascript version). Just resize the window a bit to see what i'm getting at. Here's the source: 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>Title</title> <style type="text/css"> <!-- #leftpane { float: left; height: 100%; border: 1px solid black; } #rightpane { float: right; height: 100%; border: 1px solid black; } --> </style> <script type="text/javascript"> <!-- // get rid of all this javascript and figure out a way to do this with css var windowWidth = 800; window.onload = function() { getWindowSize(); resizeLeftPane(); } window.onresize = function() { getWindowSize(); resizeLeftPane(); } function getWindowSize() { if(window.innerWidth) { windowWidth = window.innerWidth; } else if(document.documentElement.clientWidth) { windowWidth = document.documentElement.clientWidth; } else if(document.body.clientWidth) { windowWidth = document.body.clientWidth; } } function resizeLeftPane() { var rightpaneWidth = document.getElementById('rightpane').offsetWidth; var margin = 10; document.getElementById('leftpane').style.width = String(windowWidth - rightpaneWidth - margin * 3) +'px'; } //--> </script> </head> <body> <div id="leftpane"> <p>this pane needs to stretch as wide as it can while leaving room for the image at right, whose width is arbitrary</p> </div> <div id="rightpane"> <img src="http://movingboxstudios.com/testz0rz/images/box.jpg" height="100%" alt="image" /> </div> </body> </html> Basically I need a way to have 2 elements next to eachother, 1 of which is an arbitrary size and the other be wide enough to fill the rest of the containing block. Any help would be much appreciated. EDIT: Here's a link to the actual working design, maybe that'll help in understanding my question (don't open it in IE unless you want a facefull of ugly). Hey, I'm not entirely sure why this is happening, you can see it here and the css i have two divs that are side by side and i want them to have the same height, but i will not know the height ahead of time as the content for at least one of the divs is dynamic (calendar list) and can contain no items up to as many items as there are time intervals in a day. the html for the section in question is Code: <div id="spotlight-wrapper"> <div class="spotlight"> <h3>Currently...</h3> <div id="training" class="spotlight-sub"> <ul> <li><strong>Running</strong> 3mi/4mi/3mi</li> <li><strong>Bench Press</strong> 175lbs</li> <li><strong>Deadlift</strong> 205lbs</li> <li><strong>Squats</strong> 275lbs</li> </ul> </div> <ul class="inline-list"> <li> <a href="http://www.randomhouse.com/features/crichton/airframe/" title="Random House Publishing: Airframe"> <img src="/images/reading.png" alt="Airframe by Michael Crichton" /> </a> </li> <li> <a href="http://www.google.com/musicl?lid=HnJbFL6nobL&aid=lqUKIAaw6tN&sa=X&oi=musiamp;c&ct=result" title="Google Music: Hinder - Extreme Behavior"> <img src="/images/listening.png" alt="Extreme Behavior by Hinder" /> </a> </li> <li> <a href="http://en.wikipedia.org/wiki/300_(film)" title="300 the movie on Wikipedia"> <img src="/images/movie.png" alt="300 - Tonight We Dine In Hell" /> </a> </li> <li> <a href="http://www.fox.com/house/" title="Fox's House M.D. starring Hugh Laurie"> <img src="/images/television.png" alt="House M.D. on Fox" /> </a> </li> </ul> </div> <div class="spotlight"> <h3>In the public...</h3> <div id="calendar"> <ul id="events"> <li> <strong>09/25 20:00 - 09/25 21:00</strong> <br />House MD </li> <li> <strong>09/26 16:00 - 09/26 17:00</strong> <br />Weekly Tempo Run </li> <li> <strong>09/26 17:30 - 09/26 18:30</strong> <br />RPM (Christi) </li> <li> <strong>09/27 06:00 - 09/27 07:30</strong> <br />Weight Training </li> <li> <strong>09/28 06:00 - 09/28 07:30</strong> <br />Weight Training </li> <li> <strong>09/28 08:30 - 09/28 09:30</strong> <br />RPM (Lauren) </li> <li> <strong>09/29 07:30 - 09/29 09:30</strong> <br />Long Run </li> </ul> </div> </div> </div> and my unsuccessful attempt at the necessary css Code: div#spotlight-wrapper { min-height: 317px; } div.spotlight { width: 471px; height: 100%; float: left; margin: 19px 12px 7px 0; background: #373737; overflow: hidden; } div.spotlight h3 { background: #555555; margin: 0; padding: 7px; } here is a live sample Hello, I have a problem that is making me crazy! I have a simple page with some news on it. Every news is a <div> and contains two floating blocks: Image(floating left) and the text(also floating left). These blocks must stay side by side and NOT one over the other. The width of the news <div> can be 500-550px max for layout reasons. If the text is longer than the space available Firefox moves the entire text block under the image, while IE resize correctly the text block. I have tried to apply diplay:inline; to both blocks with no effect. Here is the test page Link (I have limited the width to 500px to simulate the real layout.) CSS: Code: .news { float: left; clear:left; margin: 0 0 1em 0; width: 100%; } .img_hl { float:left; margin-right: 10px; } .newstext { padding-top: 1em; float:left; } Please help me!! -- Bye Redhawk Hello, Having a bit of trouble with a <div>. I am trying to have an <img> and a <p> displayed side by side. I have tried to have two child <div> elements displayed inline, that didn't work, floating <div> elements didn't seem to do it either and then i removed the child elements and just had an <img> and a <p> with the <img style="float:left"> but, again, no joy. Does anyone have any suggestions? Hello all, Im a bit of a novice when it comes to CSS but im learning, bear with. the site in question is http://mgilbert.co.cc/testing I already have the left menu and the #maincontent div perfectly aligned side by side, but i cant for the life of me align the #left and #right divs side by side, instead the right one sits underneath the left as you can see on the site. if i float the right column, the text flows out of the maincontent div. CSS Code Code: body { background: #23232F; color: #F7CF8A; text-align: center; } a { color: #F7CF8A; } a:hover {color: #07CF8A; } #page { width: 80%; border-style: solid; margin: 0 auto; background: #494949; color: #F7CF8A; padding: 15px; } #header { background: #23232F; color: #F7CF8A; } #lmenu { width: 19%; padding: 3px; border-style: solid; float: left; } #maincontent { margin-left: 20%; border-style: solid; } #left { width: 49%; border-style: solid; } #right { margin-left: 50%; border-style: solid; } any help would be appreciated. thanks |