CSS - 3 Column Webpage Help!
I am trying to make a 3 column web page. I have the middle column, but when I add the code below for the left and right columns, nothing shows up. Is this the wrong code? Do I need to wrap them in certain tags? Thanks for your help!
Website: www.freewebs.com/weareamazing Code: #sidebar-a { float: left; width: ; margin: 0; margin-right: ; padding: 5px; background-color: white; } #sidebar-b { float: right; width: ; margin: 0; margin-left: ; padding: 5px; background-color: white; } Similar TutorialsHi all, I've tried searching around for this issue, but I've not found any help so far and it's driving me nuts. I hope someone here can advise. This is an abridged version of the site's code for example: Code: <style type="text/css"> <!-- #main1 { padding: 0px; margin: 0px; } #left { width:260px; margin:0; padding:0; float: left; } #left-top { background-image: url(../images/panel-top-left.gif); background-repeat: no-repeat; background-position: center top; height: 16px; margin: 0px; padding: 0px; } #left-middle { background-image: url(../images/panel-middle-left.gif); background-repeat: repeat-y; padding-right: 20px; padding-left: 20px; padding-bottom: 2px; } #left-bottom { background-image: url(../images/panel-bottom-left.gif); background-position: center; height: 18px; } #logo { background-image: url(../images/swalingslogo.gif); background-position: center top; width: 260px; height: 120px; background-repeat: no-repeat; } /* Navigation List */ #navlist { padding-left: 0; margin-bottom:10px; width: 217px; } #navlist li { list-style: none; margin-bottom:4px; padding: 0; font-size:1.2em; line-height:1.8em; width:217px; height:32px; background-image:url(../images/nav2.gif); background-repeat:no-repeat; margin-top: 0; margin-right: 0; margin-left: 0; } #navlist li a:link, #navlist li a:visited { display:block; text-decoration: none; color:#039; width:207px; height:32px; font-weight:bold; padding-top: 2px; padding-right: 5px; padding-bottom: 2px; padding-left: 5px; } #navlist li a:hover { text-decoration: none; color:#FF6600; } /* Testimonials */ div#fscroller { width:200px; height:200px; background-image:url(../images/bg-testimonials.gif); background-repeat:no-repeat; margin-left:8px; } div#fscroller p { margin-left: 10px; margin-right: 10px; margin-top: 10px; margin-bottom: 5px; } /* Middle Column */ #middle { margin-top: 0; margin-right: 0px; margin-bottom: 0; padding-right: 0px; padding-left: 0px; padding-top: 0px; text-align: justify; margin-left: 260px; } #middle #top-left { background-image: url(../images/panel-top-rightleft.gif); height: 16px; font-size: 2px; background-repeat: no-repeat; } #middle #top-right { float: right; margin-top: -16px; background-image: url(../images/panel-top-rightright.gif); height: 16px; width: 20px; font-size: 2px; } #middle a { color: #003399; } #middle a:hover { text-decoration: none; } /** Country Titles **/ #middle h2#unitedkingdom { background-image: url(../images/title-unitedkingdom.gif); background-repeat: no-repeat; height: 26px; width: 201px; margin-bottom: 6px; } #middle h2#antigua { background-image: url(../images/title-antigua.gif); background-repeat: no-repeat; height: 26px; width: 128px; margin-top: 16px; margin-bottom: 6px; } /* Minisite Links */ div.minisite { float: left; } div.minisite span { display: none; } div.minisite a { background-position: top; background-repeat: no-repeat; height: 168px; width: 190px; display: block; } div.minisite a:hover { background-position: bottom; } a#minisite-swimminglessons { background-image: url(../images/swimming-lessons-uk.jpg); } .clear { clear:both; } .hidden { display: none; } .notopgap { margin-top: 0; } .nobottomgap { margin-bottom: 0; } .inside { background: #EFEFEF; padding-left: 10px; padding-right: 10px; } --> </style> <div id="main1"> <div id="left"> <!-- Logo --> <div id="logo"></div> <div id="left-top"></div> <div id="left-middle"> <!-- Navigation --> <!--#include file="../inc/nav2.asp" --> <!-- Testimonials --> <!--#include file="../inc/testimonials.asp" --> <!--#include file="../inc/special-offers.asp" --> </div> <div id="left-bottom"></div> </div> <!-- Middle Column --> <a name="skipnav" class="hidden"></a> <div id="middle"> <div class="top-left"></div><div class="top-right"></div> <div class="insideleft"><div class="insideright"><div class="inside"><div class="gap-saver"></div> <!-- UK Sites --> <h2 id="unitedkingdom"><span class="hidden">United Kingdom</span></h2> <div class="minisite"><a id="minisite-swimminglessons" href="(URL address blocked: See forum rules)"><span>Swimming Lessons</span></a></div> <div class="minisite"><a id="minisite-swimminglessons" href="(URL address blocked: See forum rules)"><span>Swalings Training</span></a></div> <div class="minisite"><a id="minisite-swimminglessons" href="(URL address blocked: See forum rules)"><span>Swalings Residential Courses</span></a></div> <div class="clear"></div> <!-- Antigua Sites --> <h2 id="antigua"><span class="hidden">Antigua</span></h2> <div class="minisite"><a id="minisite-swimminglessons" href="(URL address blocked: See forum rules)"><span>Swalings Soccer</span></a></div> <div class="minisite"><a id="minisite-swimminglessons" href="(URL address blocked: See forum rules)"><span>Swalings Parties and Events</span></a></div> <div class="minisite"><a id="minisite-swimminglessons" href="(URL address blocked: See forum rules)"><span>Swalings International School of Swimming</span></a></div> <div class="minisite"><a id="minisite-swimminglessons" href="(URL address blocked: See forum rules)"><span>Swalings Babysitting and Nanny Agency</span></a></div> <div class="minisite"><a id="minisite-swimminglessons" href="(URL address blocked: See forum rules)"><span>Swalings School of Rugby</span></a></div> <div class="minisite"><a id="minisite-swimminglessons" href="(URL address blocked: See forum rules)"><span>Swalings School of Volleyball</span></a></div> <div class="minisite"><a id="minisite-swimminglessons" href="(URL address blocked: See forum rules)"><span>Swalings Training</span></a></div> <div class="clear"></div> <div class="gap-saver"></div> </div></div></div> <div class="bottom-left"></div><div class="bottom-right"></div> </div> <!-- End Middle Column --> </div> I've placed the Country Title in an H2 tag, then beneath that, each anchor is enclosed in a DIV, and is set as a left-floated block. Then I placed a spacer DIV (clear: both) to create a new line, then repeated with H2 and links. This all works fine in Firefox, IE7 and Opera, but of course IE6 is being a pig as usual. The spacer DIV is pushed to sit alongside the bottom of the left column, and I can't figure out how to (or if I can) stop this. I can't add in links properly, so I hope this is acceptable under the rules -- The site in question is: www.swalings .com/swalings/index4.asp and here's a screenshot of IE6 behaviour: www.swalings .com/images/swalings-ie6-troubleshoot.jpg Hopefully that's enough information to go on, please let me know if there's something I missed out. Thanks a lot! Rob Hi I am trying to make a table to display some stuff within a fix sized window. I want to have 5 columns of fixed width and one column that spans the rest of the remaining space. The Idea is to allow the widths of the first 5 columns to be changed by a script and having the last one adapting as needed... html Code: Original - html Code <div class="container"><table cellspacing="0"> <colgroup> <col width="40" /> <col width="220" /> <col width="120" /> <col width="65" /> <col width="40" /> </colgroup> <thead> <tr> <th>A</th> <th>B</th> <th>C</th> <th>D</th> <th>E</th> <th style="width: 100%;></th> </tr> </thead> <tbody> <tr> <td>1</td> <td>2</td> <td>3</td> <td>4</td> <td>5</td> <td style="width: 100%;></td> </tr> </tbody> </table></div> <div class="container"><table cellspacing="0"> <colgroup> <col width="40" /> <col width="220" /> <col width="120" /> <col width="65" /> <col width="40" /> </colgroup> <thead> <tr> <th>A</th> <th>B</th> <th>C</th> <th>D</th> <th>E</th> <th style="width: 100%;></th> </tr> </thead> <tbody> <tr> <td>1</td> <td>2</td> <td>3</td> <td>4</td> <td>5</td> <td style="width: 100%;></td> </tr> </tbody> </table></div> css Code: Original - css Code div.container { height: 400px; width: 800px; overflow: scroll; } table { width: 100%; } td { border-style: solid; border-color: silver; border-width: 0px; padding: 1px 3px; } th { border-style: outset; border-color: silver; border-width: 2px; background: silver; padding: 1px 3px; }
It really does fill the entire space but the last column crushes all the other into their minimal width resulting in linebreaks between words inside the cells... Please help me Hey, So I have a three column layout being implemented as such: html: Code: <div class="content"> <div class="col1 column"></div> <div class="col3 column"></div> <div class="col2 column"> <div class="header">Header</div> </div> </div> CSS: Code: .column { padding: 10px; position:relative; } .header { background:#cfe6f5; color:#416383; font-size:11px; font-family:Arial; font-weight:300; padding-left:15px; } .col1 { float: left; width:250px; } .col2 { margin-left: auto; margin-right: auto; } .col3 { float:right; width:250px; } The problem is that the width of the header div extends all the way to the left and right of the page when it's in the middle column, but behaves the way I want it to (extends to the left and right of the column) when it's in the left or right column. Any ideas? Thanks. --Surgery Question title: A 2 column layout, let only the second column scroll horizontally and let them both scroll vertically Hello I did try several idea's, but all failed. Then I did search the web but found a list of > 400.000 in google. If someone is willing to tell me if it is possible and give me some directions, please do. Everything is welcome. I got a list with 3 columns ( basically you could say I have only two columns because 2-3 could be concatenated to together, but they have a different style and justification, but I could live to start with a two column sample) f.e line 1 : value_one - ( some_text - value_two (right justified) ) line 2 : value_one - ( some_text - value_two (right justified) ) line 99:.... e.t.c Column one has a fixed width of 32px. 'some text' can be longer then the wide available and value_two is with 3 spaces appended to column 2. I want that column one is fixed horizontal and that the second and the third column can scroll horizontally. Of course when there are more line's then the height of the container is should be posable to scroll vertically. Finally I need the color behind column one be different then the column 2 and 3. So what I did create is a container with two containers where the left one has a different colour then the right one and above those a container with the list. I have overflow on auto, so I get scroll-bars when necessarily. But my problem is that when I scroll horizontally that my first column scrolls away to the left. Basically my question is. How can I get a 2 column layout, let only the second column scroll horizontally ( first is locked in horizontal place ) and let them scroll both vertically? Hello, I am having difficulty with the center column on the following page: http://cbo4edu.org/index2.html I want to widen the center column so that the CBO NEWS heading touches the blue line which divides the center and right column. When I try to add width to the style sheet the left column moves out of alignment. Any help is much appreciated, thanks! Hi, hopefully you enjoyed the title, I had a good laugh thinking of it in that split second it took me to write it. So, I found a 3 column css layout on a CSS generator website, because I got sick of trying to hack up layouts I've made in the past that didn't work. Anyhow, it was working fine with one line of content in each column when I tested it out, however, once content in the middle column was added, and stretched vertically beyond a certain point, it will drag the left columns content down with it. The right column is not affected in any way. I have spent a few hours trying to look for reasons as to why it would happen, but I had no luck. I would appreciate any help... so thank you in advance if you take a stab at it. Here's the html: Code: <body> <div id="pagewidth"> <div id="header"></div> <div id="wrapper" class="clearfix" > <div id="twocols" class="clearfix"> <div id="maincol">Main Text, woot. (aka hi hi hi)</div> <div id="rightcol">Sidebar, yippee.</div> </div> <div id="leftcol"> <div id="navigation">test</div> </div> </div> <div id="footer"></div> </div> </body> and the CSS: Code: html, body { background: #333399; margin:0; padding:0; text-align:center; font-family: Verdana, Arial, Tahoma; font-size: 12px; font-weight: normal; color: black; } #pagewidth { width: 750px; text-align:left; margin-left:auto; margin-right:auto; background: #333399 url('images/bodycontent.gif') repeat-y center top; } #header { position:relative; height:138px; background: url('images/header.gif') center; width: 100%; } #leftcol { width: 118px; float: left; left: 25px; position: relative; background-color: transparent; margin:0; padding:0; } #twocols { width: 700px; float: right; position: relative; } #rightcol { width:180px; right: 25px; float:right; position:relative; background-color: transparent; } #maincol { background-color: transparent; float: left; left: 100px; display: inline; position: relative; width: 390px; } #footer { text-align: center; height:39px; background: url('images/footer.gif'); clear:both; } .clearfix:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; } .clearfix{display: inline-table;} /* Hides from IE-mac \*/ * html .clearfix{height: 1%;} .clearfix{display: block;} /* End hide from IE-mac */ /*printer styles*/ @media print{ /*hide the left column when printing*/ #leftcol{display:none;} /*hide the right column when printing*/ #rightcol{display:none;} #twocols, #maincol{width:100%; float:none;} } Again, thank you in advance if you can come up with anything. can i make my left column, the same height as my right column? or infact, if the left is taller than the right, the right extends to it and if the right is taller than the left the left extends to it? is this possible, cheers heres my css: left column, is #leftNav and the right column is #contentMain PHP Code: #content { margin:0px auto; padding: 0; width: 760px; } #contentMain { padding: 0; margin: 0; float: right; width: 632px; } #leftNav { color: #000; float: left; margin: 0; padding: 0; width: 128px; } Hi, http://www.dudley.nhs.uk/search.asp has a two column effect. The CSS for it is he http://www.dudley.nhs.uk/css/screen.css I was wondering why if there is a table in the right hand column with a width percentage over 77% there is some horizontal scrolling? This happens in IE. Any help would be greatly appreciated. Thanks. Janusz Jasinski hi all, right have got a problem which has been bugging me for days now. i have 4 columns in a row (inside a wapper div)which all will have different content image, text other divs/classes etc. now one of these columns will be quite fluid as it will have different text on each page meaning it will be quite long on some pages not on others. the problem i am getting is in the good browsers firefox etc its ok in IE6+. the wapper does'nt seem to see the divs in the content meaning it does not get filled, meaning that the footer flys to the top and not where it should be, i dont have a live version but heres the code: mainly thanks Dan <!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=utf-8" /> <title>Untitled Document</title> <style type="text/css"> <!-- #con { width:940px; height:400px; background-color:#00FFFF; } #wapper { width:940px; background-color:#006666; } #box { width:940px; background-color:#000033; height:40px; } #menu-pronuptia { width:185px; background-color:#6633CC; float:left; display:inline; } #menu-pronuptia1 { width:185px; background-color:#009900; display:inline; float:left; } #menu-pronuptia2 { width:385px; background-color:#0033CC; display:inline; float:left; clear:inherit; } #menu-pronuptia3 { width:185px; background-color:#CCCC33; display:inline; float:left; } --> </style> </head> <body> <div id="wapper"> <div id="menu-pronuptia"> <p>test</p> <p> </p> <p> </p> <p> </p> <p> </p> <p> </p> </div> <div id="menu-pronuptia1"> <p> </p> <p> </p> <p> </p> <p> </p> <p> </p> <p> </p> </div> <div id="menu-pronuptia2"> <p> </p> <p> </p> <p> </p> <p> </p> <p> </p> <p> </p> <p> </p> <p> </p> <p> </p> <p> </p> <p> </p> <p> </p> </div> <div id="menu-pronuptia3"> <p> </p> <p> </p> <p> </p> <p> </p> </div> </div> <div id="box"> <p><br /> </div> </body> </html> Hello! I'm new to CSS, so any help would be greatly appreciated! I'm working on this page: sugarhooker[dot]com/testing/index2.html *The CSS is included in the head The right column is suppose to start where it says 'Are you hooked...' It should be right underneath the navigation bar. Anyone know what I'm doing wrong? Thanks in advance! I am a HTML&CSS novice - I am trying to write a page using a three column layout but the column colour doesn't reach the footer. I understand that this is a common problem and I've looked at a lot of examples on the web of how to work around this or create a better layout but I'm still not sure enough to know which would be the easiest and best to go within the page I have written. I want to avoid images but other than that any help would be great! I have validated the HTML & CSS and they are copied below (could any advice be really specific, as I said this is very new to me!). Thanks HTML: <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Drivers Jonas Information Unit</title> <meta name="keywords" content="1" /> <link rel="stylesheet" type="text/css" href="djiucss.css" media="screen" /> <link rel="stylesheet" type="text/css" href="djiuprintcss.css" media="print" /> </head> <body> <div id="top"> <div id="picture"> <img src="GIF.gif" alt="DJ" width="200" height="100" /> </div> <div id="heading"> <div id="title"><h1>Drivers Jonas Information Unit</h1></div> </div> </div> <div id="left"> <br/><p><a href="about.html">About us</a></p><br/> <p><a href="company.html">Company Information</a></p><br/> <p><a href="legal.html">Legal information</a></p><br/> <p><a href="landreg.html">Land Registry</a></p><br/> <p><a href="research.html">Research</a></p><br/> </div> <div id="right"> <div id="title"><h2> News </h2></div> <ul> <li>The Information Unit has recently acquired a set of new APC guides</li> <li>If you would like any training on databases</li> <li>The Information Unit has created an economy timeline </li> </ul> </div> <div id="main"> <div id="title"><h2>Main stuff</h2></div> <p>Suspendisse adipiscing malesuada lectus. Cras vitae dolor. Donec consequat, lectus sed euismod consequat, ipsum mi mollis nunc, eget nonummy neque purus a tortor. Ut vel lorem. Curabitur mollis mauris id diam. Nam posuere. In placerat sapien ut nisl. Donec volutpat augue ut velit. Proin nec mi sit amet metus placerat egestas. Quisque porttitor massa eu lacus. Donec tristique, neque in sollicitudin euismod, enim tellus varius mauris, id vestibulum est massa id massa. Integer et purus. Vivamus condimentum tincidunt ipsum. Duis augue lorem, pretium vel, cursus at, vulputate sed, neque. Quisque justo. Nunc rhoncus. In ornare venenatis velit. </p> <p>Donec facilisis ante sit amet mauris. Nunc fermentum orci eu quam. Donec vestibulum. Vestibulum ultricies nisl eu eros. Curabitur urna. Duis enim erat, lobortis nonummy, mollis non, porttitor nec, nisi. Phasellus pulvinar purus eu pede. In mollis. Duis sit amet dui et arcu rhoncus auctor. Integer est dui, pharetra vel, volutpat ac, luctus in, elit. </p> <p>Suspendisse adipiscing malesuada lectus. Cras vitae dolor. Donec consequat, lectus sed euismod consequat, ipsum mi mollis nunc, eget nonummy neque purus a tortor. Ut vel lorem. Curabitur mollis mauris id diam. Nam posuere. In placerat sapien ut nisl. Donec volutpat augue ut velit. Proin ne</p> </div> <div id="bottom"> Drivers Jonas Information Unit </div> </body> </html> CSS: #top /*DJ logo and page title - includes h1*/ { color: black; font-family: arial, sans-serif; font-size: 20px; background: #d31145; padding-bottom: 15px; } body { color: black; font-family: arial, sans-serif; font-size:14px } img /*DJ logo*/ { padding: 20px; float:left; } #heading { text-align: center; padding:20px; } /*main page title*/ /*should change all reds to DJ red: #d31145*/ #left, #right, #main { color: white; background: black; } #left { float: left; width:140px; border-right:2px solid #d31145; text-align:left; padding-left: 1em; } #right { float:right; width:140px; border-left:2px solid #d31145; text-align:left; padding-right: 1em; } #main { margin-left: 150px; margin-right: 150px; border-left: 1px solid; border-right: 1px solid; padding: 1em; } #bottom { clear:both; margin: 0; color:black; background: #d31145; font-size: 16px; font-family: Arial, sans-serif; text-align: center; } #title { text-align:center; } a:link {color:white} a:visited {color:silver} a:hover {color:#d31145} a:active {color:#d31145} hello. I am currently using a simple horizontal top menu with a vertical drop down. I would like to change the vertical drop down to be horizontal, multi column, and should accomodate more than one line, if possible. The example I'm going for is used as top navigation he nfl - baltimore ravens home page and he ge home page Here is the code I'm using currently (would like it to be all CSS). #### ul#mainNavigation { padding-left:185px; } ul#mainNavigation li { padding:0 16px; float: left; display:inline; position: relative; list-style: none; color:White; _width:1px; } ul#mainNavigation li.Seperator { padding:0px; _width:1px; } ul#mainNavigation li.over { background-color:white; } ul#mainNavigation li.over a { color:Red; } ul#mainNavigation li a { color:White; text-transform:uppercase; text-decoration:none; font-weight:bold; display:block; } ul#mainNavigation a:hover { color: Red; } ul#mainNavigation li a { display: block; } ul#mainNavigation li p { height:19px; } ul#mainNavigation li ul { display: none; position: absolute; background-color:Black; opacity:.8; filter: alpha(opacity=80); -moz-opacity: 0.8; margin-left:-16px; } ul#mainNavigation li.over ul { display: block; z-index:999; } ul#mainNavigation li.over ul li { float: none; background:none; border:none; white-space:nowrap; padding:0px; } ul#mainNavigation li.over ul li a { color: white; padding:5px; border-bottom:solid 1px black; } ul#mainNavigation li.over ul li a:hover { background: #3d1f6e; color: white; } ~~~~~~~ HTML ~~~~~~~~~~~~~~ <ul id="mainNavigation"> <li> <p><a href="Mainlink1.html">Mainlink1</a></p> <ul> <li><a href="link2.html">LINK 2</a></li> <li><a href="link3.html">LINK 3</a></li> <li><a href="link4.html">LINK 4</a></li> <li><a href="link5.html">LINK 5</a></li> <li><a href="link6.html">LINK 6</a></li> <li><a href="link7.html">LINK 7</a></li> </ul> </li> <li> <p><a href="Mainlink2.html">Mainlink2</a></p> <ul> <li><a href="link2.html">LINK 2</a></li> <li><a href="link3.html">LINK 3</a></li> <li><a href="link4.html">LINK 4</a></li> <li><a href="link5.html">LINK 5</a></li> <li><a href="link6.html">LINK 6</a></li> <li><a href="link7.html">LINK 7</a></li> </ul> </li> </ul> #### Thank you, in advance! ~ lahddah hi every one i am kind of new to this i am making a website but how do you put css on you webpage i am using web page maker and i want to put a table on my website just take a look at tothegame.com and see their table for games and stuff and i also want to use the search function and the filter and the abcdfg function how do i get or where do i get that kind of tables for my website its amovie site and i want to use that as a list for my movies that people can choose and filter by name or released date hope that ssomebody can help me out thanks hello guys, I am creating a webpage using CSS for my layout. when I look at the page, it seems ok but all my "DIV" are positoned relative to the left side of the screen. so if you maximize the screen, you get a huge space on the far right side of the screen. I was wondering if there is anyway I can centre the page in the window no matter the size of the screen. I have provided a link to a version of the page and the CSS file is included here. each id represents a DIV in the design. http://www.radien.plus.com/test.html thanks guys Code: #Logo { Margin : 0; Padding : 0; Width : 125px; Height : 125px; Border-color : aqua; Border-top-width : medium; Border-right-width : medium; Border-bottom-width : medium; Border-left-width : medium; Border-top : 1px solid#00; Border-bottom : 1px solid#00; Border : 1px solid#00; Border-left : 1px solid#00; Border-right : 1px solid#00; } #news { Font-family : Arial , Helvetica , Sans Serif; Font-size : 80%; Font-weight : normal; Margin : 0; Border-top-width : medium; Border-right-width : medium; Border-bottom-width : medium; Border-left-width : medium; Width : 150px; Height : 250px; position : absolute; top : 140px; Padding : 3; Margin-top : 0; Text-indent : 3px; Border-top : 1px solid#00; Border-right : 1px solid#00; Border : 1px solid#00; Border-left : 1px solid#00; Border-bottom : 1px solid#00; } #Products { Font-family : Arial , Helvetica , Sans Serif; Font-size : 80%; Font-weight : normal; Margin : 0; Border-top-width : medium; Border-right-width : medium; Border-bottom-width : medium; Border-left-width : medium; Width : 150px; Height : 200px; position : absolute; top : 397px; Padding : 3; Margin-top : 0; Text-indent : 3px; Border-top : 1px solid#00; Border-right : 1px solid#00; Border : 1px solid#00; Border-left : 1px solid#00; Border-bottom : 1px solid#00; } #unknown { Font-family : Arial , Helvetica , Sans Serif; Font-size : 80%; Font-weight : normal; Margin : 0; Border-top-width : medium; Border-right-width : medium; Border-bottom-width : medium; Border-left-width : medium; Width : 150px; Height :150px; position : absolute; top : 605px; Padding : 3; Margin-top : 0; Text-indent : 3px; Border-top : 1px solid#00; Border-right : 1px solid#00; Border : 1px solid#00; Border-left : 1px solid#00; Border-bottom : 1px solid#00; } #banner { Font-family : Arial , Helvetica , Sans Serif; Font-size : 80%; Font-weight : normal; Margin : 0; Border-top-width : medium; Border-right-width : medium; Border-bottom-width : medium; Border-left-width : medium; Width : 604px; Height : 125px; position : absolute; left : 140px; Padding : 3; Margin-top : 0; Text-indent : 3px; Border-top : 1px solid#00; Border-right : 1px solid#00; Border : 1px solid#00; Border-left : 1px solid#00; Border-bottom : 1px solid#00; } #shopping { Font-family : Arial , Helvetica , Sans Serif; Font-size : 80%; Font-weight : normal; Margin : 0; Border-top-width : medium; Border-right-width : medium; Border-bottom-width : medium; Border-left-width : medium; Width : 125px; Height : 125px; position : absolute; top : 7px; left : 750px; Padding : 3; Margin-top : 0; Text-indent : 3px; Border-top : 1px solid#00; Border-right : 1px solid#00; Border : 1px solid#00; Border-left : 1px solid#00; Border-bottom : 1px solid#00; } #search { Font-family : Arial , Helvetica , Sans Serif; Font-size : 80%; Font-weight : normal; Margin : 0; Border-top-width : medium; Border-right-width : medium; Border-bottom-width : medium; Border-left-width : medium; Width : 150px; Height : 90px; position : absolute; top : 140px; left : 725px; Padding : 0; Text-indent : 3px; Border-top : 1px solid#00; Border-right : 1px solid#00; Border : 1px solid#00; Border-left : 1px solid#00; Border-bottom : 1px solid#00; } #poll { Font-family : Arial , Helvetica , Sans Serif; Font-size : 80%; Font-weight : normal; Margin : 0; Border-top-width : medium; Border-right-width : medium; Border-bottom-width : medium; Border-left-width : medium; Width : 150px; Height : 210px; position : absolute; top : 238px; left : 725px; Padding : 3; Margin-top : 0; Text-indent : 3px; Border-top : 1px solid#00; Border-right : 1px solid#00; Border : 1px solid#00; Border-left : 1px solid#00; Border-bottom : 1px solid#00; } #footer { Font-family : Arial , Helvetica , Sans Serif; Font-size : 80%; Font-weight : normal; Margin : 0; Border-top-width : medium; Border-right-width : medium; Border-bottom-width : medium; Border-left-width : medium; Width : 150px; Height : 210px; position : absolute; top : 238px; left : 725px; Padding : 3; Margin-top : 0; Text-indent : 3px; Border-top : 1px solid#00; Border-right : 1px solid#00; Border : 1px solid#00; Border-left : 1px solid#00; Border-bottom : 1px solid#00; } Hey guys so I'm trying to create a bar at the top of my webpage, except the left and right sides are different than the middle. So I thought I'd approach this by dividing up the webpage into three sections, left middle and right. Code: body { background-color:#B7E7F9; } /*Big Wrap*/ #mainwrap{ margin-top:0px; height: 100%; width: 100%; } /*Left Side*/ #leftwrap{ align: left; background:url(images/Left_Top_Bar.jpg) no-repeat; } /*Right Side*/ #rightwrap{ align: left; background:url(images/Right_Top_Bar.jpg) no-repeat; } /*Header*/ #header{ background:url(images/Top_Bar_Part.jpg) repeat-x; } I then implemented it in 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=utf-8" /> <title>My Webpage</title> <link href="style.css" rel="stylesheet" type="text/css" /> </head> <body> <div id="mainwrap"> <div id="leftwrap"></div> <div id="header"></div> <div id="rightwrap"></div> </div> </body> </html> Now when I open the html file in a browser, all I see is the background color that I put in for body, but none of my wraps seem to be displaying. I was also wondering if there was an easier way to do this. The header is just a simple rounded rectangle that is running across the entire top. I want the same rounded rectangle look for all users regardless of resolution. Thank you for your help, Popnbrown hello guys,, I was wondering how to make a webpage take the full browser size and not over flow or be smaller than the browser window also atleast 800 x 600 thnx for ur time.. HMV Hello - this is my first time on the forum. I'm sure I must be missing something really simple. I'm not very experienced at CSS, and must admit I can't grasp the inherited properties principle, which may be the cause of my problem. I've pasted my code for the web page and my properties stylesheet below. Although, as you can see, I want to put a header near the top of the web page, nothing appears in my browser. (I mean nothing, the words I have put the header tag to just aren't there). I would be very grateful for some help. Thank you. The CSS validator says "Value Error : color attempt to find a semi-colon before the property name. add it" which I don't understand. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" <head> <title>Love Local Food - about us</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <meta name="keywords" content="love local food, love local, love food, local food, exeter food, devon food, devon vegetables, exeter vegetables, local vegetables, real bread, slow food, slow food exeter, slow food devon, rye bread, good food, good local food, van food, van exeter, van devon, local van, mobile shop, workshops, workshop, farm, farms, organic, organic food exeter, fresh food, local fresh food, fresh food exeter, fresh food devon " /> <meta name="description" content="We sell good fresh food by van in your locality" /> <meta http-equiv="PRAGMA" content="NO-CACHE" /><!-- --> <link rel="stylesheet" type="text/css" href="layout.css" /> <link rel="stylesheet" type="text/css" href="presentation.css" /> </head> <body> <!-- Header --> <div id="bar-top"> <p class="links"> <a href="index.html">home </a> <a href="mobileshop.html">mobile shop </a> <a href="farms.html">farms </a> <a href="workshops.html">workshops </a> <a href="joinus.html">join us </a> <a href="aboutus.html">about us </a> <a href="contactus.html">contact us </a> </p> </div> <!-- end of header --> <!-- main column --> <div id="main"> <p> <img src="slice4.jpg" alt="love local food" border="0" width="400" height = "125" class="center" /></p> <p> <img src="logo.gif" alt="love local food" align="left" border="0" width="300" height="175" /></p> <p class="header">about love local food</p> <p> Love Local Food is a new social enterprise initiated by Emmas Bread, Shillingford Organics, West Town Farm and organicArts along with others including David Tuffield, David Bossano, Rachel Moffat, Nicola Beglin, Paula Garwood, Amber Dawkins and Chukumeka Maxwell.</p> <p class="text">We are a group of local producers, educators and passionate food lovers who propose to bring a new and simple way of shopping to Exeter and surrounding areas.</p> <p class="text">We first met in July 2007 with the intention of becoming a workers co-operative that supported each other in the produce and sale of locally grown food.</p> <p class="text">We want to provide local food to local communities, provide a fair return to local producers and provide links between the consumer and producer through educational activities and resources.</p> <p class="text">We want to help consumers make the connection between the food they eat and the environment in which they live, and to help local people achieve well being.</p> <p class="text">We look to a future of the sustainable production and distribution of food, including allotments and gardens, where we renew our relationship with food and nature, and share the land.</p> <p class="text">A future where local communities, schools and other institutions are involved in commissioning local food production, community celebrations and sharing with other cultures.</p> <p class="text">A future where we are all open to new ideas about food and our relationship with it.</p> <!--links-box--> <div id="links-box"> <p class="links"> <a href="emmasbread.html">emmas bread </a> </p> <p class="links"><a href="shillingford.html">shillingford organics </a></p> <p class="links"><a href="westtown.html">west town farm </a></p> <p class="links"><a href="organicarts.html">organicARTS </a> </p> </div> <!--end of links box--> </div> <!-- end of main column --> </body> </html> /* Presentation Stylesheet */ .header { font-family: Arial, Helvetica, sans-serif; font-size:20px; color:#000000 margin:0; padding:10px 10px 10px 15px; } .links { font-family: Arial, Helvetica, sans-serif; text-align:center; font-size:20px; color:#000000; } .links a:link { color: #560007; text-decoration:none; } .links a:visited { color: #EF9C00; text-decoration:none; } .links a:active { color:#560007; text-decoration:none; } .text { font-family: Helvetica, Arial, Verdana, sans-serif; font-size:15px; color:#000000; } Hey Folks, I am a newbie with designing webpages and having some problems with a website that I just created. If any of you could point to a resource of help me out, that be great. Heres the link www.pcdigger.com The middle part is messed up in firefox. HTML and CSS both are validated per www.w3.org but I guess, that doesnt do anything for firefox. Thanks, DesignFlaw I know it's probably something simple, but I'm having trouble centering my web page in CSS. I want to center it no matter what resolution a visitor has their monitor set to or the size of their monitor. I've tried the following to no avail: Code: margin-left: auto; margin-right: auto; margin-top: auto; margin-bottom: auto; Any suggestions? I have a QA site where I want to have a very translucent image displayed over the entire page to help our testers more visually recognize that the site they are on is not production (or worse thinking they are on QA when they are on production). My initial idea was to create a fixed position div with a repeating background images. While this visually accomplished what I want, it ends up masking the entire site, making it impossible to click on any links that are displayed underneath the QA images. What is the best way to do this (sans javascript)? Any help is much appreciated. |