CSS - Layout Gurus, Need Your Help On This One
Hi
If you take a look at http://www.bullsigns.com/layout.gif this is the layout I am trying to acieve. 2 colums 1 floated left 1 floated right, with the navigation placed over them. I presume this would have to be absolute positioned.? Could someone give me a start on the css code and html on how to achieve what I want. I have this so far Code: <div id="wrapper"> <div id="navigation">navigation <div id="left">left <div id="right">right </div> Code: #wrapper{ width:760px; margin-left:auto; margin-right:auto; text-align:left; } #left{ float:left; width:290px; height:500px; margin:0; margin-right:0; padding:0; } #right{ float:left; width:290px; height:500px; margin:0; margin-right:0; padding:0; } #navigation{ position:absolute; } Thanks alot!!! Similar TutorialsHi guys, Thi sproblem has complete stumped me. I've strippe dback my code to keep it simple: http://www.express2000.co.uk/test1.php I have setup the button of the from to be an image but as you can see there is a white outline and dash in the middle of the image. i've tried flushing the style but nothing will remove it. If you view source you'll see the code I am using for the button: Code: input.image { background-image:url(images/login_button.png); height:15px; width:50px; } Any ideas, hopefully one of you experts knows the answer because I'm stumped! Thanks in advance, Rob. Ok, here's a bit of short background. I haven't done web design or graphic design of any kind in years, and I decided a good way to get back into it would be to give my band's (Cassius) myspace page a facelift. I set up a phony copy of our own, in order not to frustrate any users on our page while I inevitably blundered through the new design. Now, if you aren't familiar with coding on Myspace, it only allows you to edit several sections of your page, and not at all the overall code of the document itself. This means any serious changes you want to make are done very vicariously through CSS, being placed somewhere in the middle of the actual source of the page itself. Irritating, but workable. Everything was going very well. I got frustrated several times, but always found a way to do what I wanted. That is, until I opened the page in IE (v6 and v7 later). (URL address blocked: See forum rules) That is the address. So far, everything appears as I want in Firefox. However, when using IE, the flash player doesn't position correctly, and there are some other minor issues as well. The flash player is the largest problem. So my question is this....how can I persuade IE to position everything properly, while fitting within the ridiculous (im)practical constraints of the actual coding, placed by Myspace? Thanks in advance!! Perhaps you guys can help me debug this CSS problem I am having. Take a look at the following url: problem url The problem is that setting the background style for ROW elements in the inner table isn't working. It works fine for TD elements as well as the Table itself. One thing to note is that the TD did inherit from the outer table so I had to set the background color to transparent. But seeing as the background color for the table is showing through (sky blue), I don't see why the background color for the rows in the table isn't coming through. I am trying to get this working in IE, but it's not rendering properly in Mozilla either so I feel it may be a CSS problem. Any suggestions? Thanks! Hello I'm hoping a CSS guru will be able to help me out. I'm thinking this is a simple question, but CSS is not my strength. I have a three column layout. First column is going to contain RSS feed headline, second column is the main site content and the third column is meant for ads. As it stands now, the first column and the third column are slowing the page load, since they use javascript to suck in RSS (for the headline) and phpAdNew for the the Ads. What I'd like to do is create a div at the bottom of the page, so these load last and then are positioned relatively to those columns? I hope that makes sense. I'm not sure how to move position after page load.. almost seems like I need to make a layer within a layer or something?? This is an example of what I'm trying to do: Code: <html> <head> <title>Test</title> </head> <table cellpadding=0 cellspacing=0 border=0 valign="top"> <tr> <td width=100> <!-- headline rss feed javascript --> </td> <td width=500> <!-- main content --> </td> <td width=100> <!-- phpAdNew javascript --> </td> </tr> </table> <div id="headline"> <script language="javascript" src="http://www.domain.com/path/to/headline.js></script> <!-- I'd like this to be placed in column 1 --> </div> <div id="ads"> <script language="javascript" src="http://www.domain.com/path/to/ad.js></script> <!-- I'd like this to be placed in column 3 --> </div> </body> </html> Anyways, any help is greatly appreciated. Let me know if you need any additional information from me, etc. Thanks! hanji Hello, I am using an OS Commerce layout for a client's website. On this page - www.mts-diesel.com you will see how I have the homepage laid out in anticipation of design, with 3 divs of varying colors. One div with an id of #hp_left is where I want to put a nice jquery code. But when I insert that into #hp_left it breaks the whole layout, was seen here www.mts-diesel.com/index2.php I'm not sure what in the css in the code for this script is breaking my layout but Ithought someone here might be willing to shed some light. A big thank you. Tom I am working on the new home page which is based on a template. The left sideColumn is working fine, however I am having a few problems with the mainColumn layout. Here is a static image to show what I want it to look like Here are the problems I am having: 1) The #scroll box is place where I want it in IE but in foxfire it is right up against the left side of the #sideColumn partially hidden. There will be text that scrolls into this box and stops. I haven't started on the part yet - in case that makes a difference. Not my choice, but that is what the bosses want. 2) I want the image centered horizontal within the #mainColumn. Here is what I have for the css: #home img { margin: 5px auto 5px auto; } which I thought would do the trick, but it's not. 3) I want the p text to have a 40px margin on the right and left side like the .large does. Here is what I have for the css: #home p, .large { margin: auto 40px auto 40px; } It works for the .large (Welcome to Vitalograph), but not for the text below it. At one point I had it working, but after addtional changes fixing other problems, now it doesn't and I can't figure out why. Here is the xhtml starting at the 2 column part (wrapper): Code: <!--begin wrapper--> <div id="wrapper"> <!--begin side column --> <div id="sideColumn"> <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">Customer 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> <!--end of side column --> <!--begin main column --> <div id="mainColumn"> <!-- InstanceBeginEditable name="Main_Section" --> <div id="home"> <div id="scroll"><span>scrolling news will go hear and stop</span></div> <img src="/images/boys_bubbles.gif" width="485" height="333" alt="boys and bubbles" /> <span class="large">Welcome to Vitalograph</span> <p>Vitalgraph offers a wide range of spirometers along with other asthma management equipment with over 40 years experience. From simple hand-held units to sophisticated Windows based spirometry systems, we have it all. Check out our full line of respiratory equipment under the product category.</p> <p><a href="/about_us/about_us.html">more about us...</a></p> </div> <!-- InstanceEndEditable --> </div> <!--end of main column --> </div> <!--end of wrapper--> Here is the vitalograph_master.css: 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; } /*Main Section two columns under top section*/ #wrapper{ padding: 10px 10px 10px 0px; width: 100%; height: 100%; } #sideColumn { float:left; width:155px; height: 78%; background-color: #5094F9; padding-top: 50px; padding-left:10px; padding-bottom:10px; pading-right: 10px; margin-right: 10px; 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; } #sideColumn a:link, #sideColumn a:visited { background-color: inherit; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; text-decoration: none; color: #FFFFFF; font-size: 12px; font-weight: bold; } #sideColumn a:hover, #sideColumn a:active { background-color: #FFFFFF; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; text-decoration: none; color: #5094F9; font-size: 12px; font-weight: bold; } #sideColumn ul { list-style: none; padding: 15px 0px 15px 10px; margin: 0px; } #mainColumn { padding: 0px; } /*footer*/ .footer { font-family: "Times New Roman", Times, serif; font-size: 9px; color: #999999; } /*text*/ .large { font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; color: #5094F9; font-size: 18px; font-weight: bold; margin-bottom: 15px; } Here is the home.css: Code: /*home page*/ #home { margin: auto; } #home img { margin: 5px auto 5px auto; } #home p, .large { margin: auto 40px auto 40px; } #home a:link, #home a:visited { background-color: inherit; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; text-decoration: none; color: #5094F9; font-size: 12px; font-weight: bold; } #home a:hover, #home a:active { background-color: inherit; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; text-decoration: none; color: #990099; font-size: 12px; font-weight: bold; } #scroll { width: 560px; padding: 5px; background-color: inherit; border: 1px solid #5094F9; margin-bottom: 5px; } Any help or suggestions are greatly appreciated. Hi there and thanks for reading & helping! I am new to this site, but here is my question: I need to build about a 20 page website. I have been told I should do the "layout" for each page using CSS. Is it possible for each page to "link" to one CSS file for layout instructions? I have found suitable CSS layout templates but am unsure how to link each page to the external CSS file for a basic "header, 2 column, footer" layout, or if it is even possible? Attached is my html page and my css file. The css is a template i got off ssi-developer. I'm changing it around a bit to fit my needs. The way I have the page now is fine I'm just curious to know if I can do this one thing. What I'm wondering is if I have to make different classes for the multiple rows that I have. Is there a way I can make the same layout without making all the rows. Once you see my files you will get a better understading of what I'm trying to accomplish. heyya, I'm doing a quick layout, and I'm running into some problems with my floating menu. Code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> <head> <style type="text/css"> body { margin:0; padding:0; background-color:white; font:normal 1em/150% Verdana,Arial,sans-serif; } #container { width:750px; padding:0; margin:0; background:#FAA; } #contents { width:566px; margin:10px 0 0 162px; border:1px solid #999; border-bottom:none; padding:10px; background:#FFF; } #contents p {font-size:80%;line-height:150%;} #menu { width:160px; background:#FFA; margin:0; padding:0; float:left; } img {border:none} </style> </head> <body> <div id="container"> <div id="menu"> <p>Wisi te quis lobortis dolor vel hendrerit consequat ex. Nulla hendrerit ad et. Praesent adipiscing nostrud dolore, feugait velit dolore dignissim. Aliquam blandit consequat ex blandit praesent hendrerit. Commodo in nonummy suscipit facilisi lorem ullamcorper dolore vulputate ea, ullamcorper eum duis delenit. Iriure nostrud qui, vulputate ut aliquip at, amet ut, erat, consequat autem. Facilisis sit lorem te illum suscipit zzril. Dignissim illum, duis accumsan. Et, duis enim euismod wisi commodo elit amet. Hendrerit nulla luptatum dolore tincidunt nulla nulla minim velit feugait accumsan, dolore minim, feugait nonummy, elit vero erat.</p> </div> <div id="contents"> <a href="#"><img src="bedroom-furniture.jpg" width="566" height="250" border="0" alt="" /></a> <h3>Welcome to mook</h3> <p>Wisi te quis lobortis dolor vel hendrerit consequat ex. Nulla hendrerit ad et. Praesent adipiscing nostrud dolore, feugait velit dolore dignissim. Aliquam blandit consequat ex blandit praesent hendrerit. Commodo in nonummy suscipit facilisi lorem ullamcorper dolore vulputate ea, ullamcorper eum duis delenit.</p> <p>Facilisis sit lorem te illum suscipit zzril. Dignissim illum, duis accumsan. Et, duis enim euismod wisi commodo elit amet. Hendrerit nulla luptatum dolore tincidunt nulla nulla minim velit feugait accumsan, dolore minim, feugait nonummy, elit vero erat.</p> </div> </div> </body> </html> readers digest version: I have a 750px container. My content div is 566, plus 2px for the border, plus 20px for the padding. Giving it a margin-left of 162px gives us a grand total of 750. IE seems to hate the padding - when i modify that it works fine - even changing the margin doesn't do anything. and there's an extra 2px between the menu and the contents just in case. So I can't figure why it's bumping down in IE. and i'm using v6, and have the doctype declared, so it shouldn't be in quirks mode. TIA, Greg The site I'm working on is located at the following address: http://www.solinari.net/div.php On the left, the navigation is in two pieces - a left and a right piece. I need to have both pieces extend to the bottom of however long the page is. The bottom div's of both pieces of the navigation each have an image repeating vertically, my question is how to get the div to extend to the bottom of the page. Any help would be greatly appreciated. Regards, Solinari Hi, Happy New Year This is a continuation of a thread begun in the javascript forum. I'm continuing it here because I think I've solved/avoided some of the javascript aspects of the problem by tackling the design in a slightly different way. I'm struggling with what should be the simplest part of this problem, which is to make the li elements arrange themselves like the attached image rather than the way they presently appear on my site. Furthermore, ideally, I'd like it all to work with the smoothness of Isotope or Quicksand, but maybe that's a problem for another day... As always, any and all help gratefully appreciated! (Also, I'm baffled as to why the thumbnails show up fine on my home PC, but not at all on my work one !?!? Oh, now it's working - this is too bizarre!?!?) I'm working on converting a website from tables to div's and running into one little issue. The site is a basic header on top, navigation on left, content on right and a footer on the bottom. I would like the navigation div to grow in height to match the height of the content div so that the background fills the left side of the page. I have placed the nav and content divs in a container div and set a min-height on the container. I was hoping that that would let me place height: 100% on the navigation div but it isn't growing ever. Is there a way to get something like this done? FYI, the site is currently at http://users.adelphia.net/~mmorasch/ Hello. I am currently trying to learn CSS. I have experience in HTML, PHP/mySQL, and some .NET(ASP.NET & C#). I am currently working on a web design project. I know how beneficial CSS can be. I am understanding most of the concepts. I am trying to divide my page up into a parent main page. For example, there is a background color(style). On top of that is my parent main page section. It is similar to a piece of paper on top of a larger(darker) piece of paper. Then within that main page I am going to have about 3-4 separate boxes, which will make up different sections(news, departments, etc). The problem I am having is I have everthing setup with 1 box within the main page. However, I put the other box in the same nested <div class = "page"> tag and I can get it where I want in terms of left, right, and bottom positioning for margins. However, I can not get the 2 boxes to be on the same row. There is space on my page that I cannot use. With my prior experience I know that the solution to this problem was using nested tables. However, from my understanding I thought I could refrain from using tables and use some CSS techniques instead. Please give me any input you might have or any questions that might seem confusing. I might be able to post up a site so a person could see what I am trying to do. Hi everyone- I'm new here and am a newbie with CSS layouts. I'm having trouble with certain elements on the page that I was wondering if someone might be able to take a look at my code and html file. I'll trade graphics services for a few minutes of your time if neccesary. Hopefully someone can let me email them I'll give mine as well I'm sure it's easy to find on my profile. Thanks in advance for any help. 'Ello, I have just started to create a new web site for my self about a game called Warhammer 40,000. Although I have come across a problem near the start of its construction. I have a layer in the top right hand part of the web site for the search fields, on Internet Explorer it positions it self fine, but in Netscape (tried in v7.2) and FireFox (tried in v1.0 and v1.0.3) it its slightly higher and in Opera it just displays it all the way off to the bottom of the web site. One thing I have noticed is that this layer aligns up perfectly in Opera providing there is nothing between the two div tags, which seems strange to me. Here is the home page of the web site, as you can see there isn't much done to it yet as I want to fix this problem before procceding onwards. My CSS document is located here. If you view this in Opera v7.52, Netscape v7.2, FireFox v1.0 and/or v1.0.3 and Internet Explorer v6 you will see what I men in the top right hand corner, may have the same effect in other versions of these browsers but I have not checked. Thank you in advance, El Barto. Hi, I am relatively new to CSS and am trying to come up with a layout very similar to Noteableapp. What I like about that design is that the taskbar stays floated at the top, while the central column exands with the width of the browser. What I'm trying to do different is have a much more detailed background image, rather than a simple gradient. The problem I'm having is that the navigation divs seems to be transparent so the detailed texture shows through. I've tried building the divs from scratch without success as I can't seem to get the central column to stay in the centre of the page, so I had a look at the css for Noteableapp however its a bit complicated for me and raised more questions than answers! Can anyone point me in the direction of a good tutorial to achieve a layout similar to Noteableapp or able to contact me and guide me through what is actually happening with the noteable css. My preference would be a tutorial so I can actually understand what is happening but any help would be much appreciated. Hi I want to achieve this layout using CSS http://www.premier-resin-systems.co.uk/layout.jpg I want it to be 3 columns, but as you can see the navigation part overlaps the red background image that I was going to put in my header div. I would like some help if poss on how to put this design into divs before I plough staright in!! Thanks for any help or advice! So I'm trying to get a semi-liquid layout that has the side benefit of allowing the HTML page content to be organized in a way that losing the stylesheet won't kill it. Ideally, the HTML page would be: LOGO BREADCRUMBS CONTENT MENU RIGHTSIDE CONTENT FOOTER Unfortunately, I've had to move the rightside content up in the page order since I can't seem to configure my CSS in a way that makes it work the other way. This is as far as I've gotten, and I can't get the footer to properly begin at the end of the longest element. I know it's a side effect of the absolute positioning of the Logo and Menu, but I can't think of a way to layer this stuff any better. Help! If you can help me get this up and running, I'll be sure to thank you and hit you back with a link on my site when it's done. Since I can't link directly to anything yet, here's the image of what the layout should look like. I want the footer to fall under the scroll bar if there is one, I don't want a ever-present footer. Code: www.ctechsinc.com/temp3/mockupb.gif Code: * { padding-left: 0px; margin:0px; } table { border-collapse:collapse; } img { border:none; } #container { width:100%; } .logo { float: left; height: 260px; width: 200px; background-color: #0099CC; } .menu { background-color: #996699; width: 200px; height: 150px; float: left; position: absolute; top: 260px; left: 0px; } .greenwrap { background-color: #006633; margin-left: 230px; margin-top: 10px; /* this can be deleted once implemented; it's only here to help align things */ } .breadcrumb { background-color: #99CCCC; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; } .content { min-width:220px; height:100px; background-color: #00CCCC; float: left; } .contentwrap { background-color: #00FF99; float: left; } .sidebar { width: 200px; background-color: #3399FF; float: none; right: 0px; position: absolute; } .box1 { background-color: #00FFFF; min-width:220px; margin-top: 20px; margin-right: 220px; margin-bottom: 20px; margin-left: 20px; } .qlink { margin: 20px; } .footer { margin:0px; width: 100%; float: left; clear: none; } Code: <html> <head> <link href="screen2.css" rel="stylesheet" type="text/css"> </head> <body> <div> <div class="logo"> Logo </div> </div> <!-- content, RH --> <div> <div class="greenwrap"> <div class="breadcrumb"> <h1>BREADCRUMBS</h1><br> </div> <!-- <div class="content"> --> <div class="contentwrap"> <div class="box1"> <h2>heading!</h2> <p>Lorem Ipsum buttsecks. Lorem Ipsum buttsecks. Lorem Ipsum buttsecks. Lorem Ipsum buttsecks. Lorem Ipsum buttsecks. Lorem Ipsum buttsecks. Lorem Ipsum buttsecks. Lorem Ipsum buttsecks. Lorem Ipsum buttsecks. Lorem Ipsum buttsecks. </p> </div> <div class="box1"> <h2>heading!</h2> <p>Lorem Ipsum buttsecks. Lorem Ipsum buttsecks. Lorem Ipsum buttsecks. Lorem Ipsum buttsecks. Lorem Ipsum buttsecks. Lorem Ipsum buttsecks. Lorem Ipsum buttsecks. Lorem Ipsum buttsecks. Lorem Ipsum buttsecks. Lorem Ipsum buttsecks. </p> </div> </div> <div class="sidebar"> <div class="qlink"> <p>boring content boring contentboring content boring contentboring content boring contentboring content boring contentboring content boring content </p> </div> </div> <!-- </div> --> </div> <div class="menu"> <p>Menu</p><p>Menu</p><p>Menu</p> </div> <div class="footer"> <p>Fooooooooooooooooooooooooooooooooooooooterrrrr!</p> </div> </div> <!-- menu --> </body> </html> Hello, I am creating the base design of a web site that consists in two horizontal bars: Navigation and Intro. "Navigation" will contain the menu. "Intro" will contain two items: a logo (image) on the left and a banner (flash) on the right. In this moment I have the following: http://www.27lamps.com/Beta/Bar/Bar.html I am not sure if using a background image is the best way to do this ... ... it seems to me that since the two bars are two different sections then I should use two divs. So the questions I have: 1. Should I use two divs, one for each bar, and setting the line- height in em instead of using the background image? 2. How to place side by side the logo and the banner and centered them vertically? 3. I would like the Navigation and the Intro bars to have a minimum height. Thanks, Miguel |