CSS - Box Model Or Layout Design Problems
Good morning all,
iv been fiddling with css for a couple months now, and iv done a couple pages and i want to do a more advanced style layout Im running into some float problems, im hoping somone can think of a better way to do this. heres a picture of what im roughly immaginging my page layout to look like. The problem i run into is having the 3 nav boxes on the right they seem to mess up any floats in the main window where content would go. heres a picture of how the problem looks: Its like i want to clear the floats inside the main content div, but not clear the div floats outside. Im a bit stumped can anyone help me out, would be happy to explain more or provide css source. any suggestions on a better way to do this. Similar TutorialsI am trying to recreate part of a website that uses tables and images but with DIVs and CSS instead. I am having a problem with the box model and frankly its not making sense to me. Here is a how it is supposed to look: EDIT: sorry, can't get it to display properly in ASCII. Anyways one main div (blue backgroun). Inside it, another div (black background) so that it looks like a black box with a blue frame around it. No I can't use border for the black div either. The black div has another in it (float left) and on the right will be a flash object or some words or something. The height of the blue box is 521px, the blue box inside is 450px. I tried either padding and margin-top of 20px and instead of shifting the black box, it shifts the blue (container) box down and the black one stays in the same place. Here's some code snippets. I am not entirely concerned with the file in the include, it displays properly. It is simply a <UL> grouping. Code: <div id="content"> <div id="contentWrapper"> <div id="indexLeft"> <!--#include file="include/indexNav.asp"--> </div> Content </div> </div> Code: #content { width:1001px; height:521px; margin-left:auto; margin-right:auto; border-left: 5px solid #365F97; border-right: 5px solid #365F97; background-color:#16365D; } #content #contentWrapper { width:961px; height:450px; margin-top:20px; margin-left:20px; margin-right:20px; background-color:#000000; } Why would margin-top on the wrapper move the parent div instead? have the following declaration Code: .small_header { height: 28px; width: 175px; background: url(../images/blue_header.gif); } now if i add Code: padding: 7px 0px 0px 15px; i reduce the height by 7 and the width by 15 to compensate. This works fine in Firefox and IE6 but when testing it in IE5.5 it actually displays the division at the smaller size (it doesnt take into account the new padding). Why is this? I'm converting a site from a table layout to a css layout. I've got a basic 3 column layout and it seems to work just fine except for one problem. my left and middle columns will never be set heights and they are different colors. So, is there anyway to make the two divs be the same height so that the colors go all the way down regardless of which column is longer? here are 2 examples, the first is the left column longer(teal) and the second is the middle column longer(white). first example left column longer second example middle column longer thx! hi guys I've begun trying so I finally can leave <tables> I've started trying with a little opensource template, and now want to be how much correct I am... The following image shows the original design, also with the layers division I've created I'd like to know if I'm going ok with this initial design, or which would you modify, and so on. Then I'll follow up the thread with the code, so I can see if I learned correctly Thanks a lot in advance, 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. I'm trying to make a box (graphic) that will expand vertically as more content is added. I've made my border with flourishes and shadows, so a purely CSS box design isn't an option... Here's an exploded view of what I'm looking to do: ________________ |.........................| |.........................| |.........................| Top section that is static |.........................| |.........................| |.........................| Middle section with vertically |.........................| repeatable graphic |________________| Bottom section that closes it off Here's my code so far... Code: <div id="container" style="width:956px; margin:0px auto -1px auto;"> <div id="topedge" style="background-image:url(images/topedge.png); width:850px; height:15px;position:relative; left:53px;"></div> <div id="leftcolumn" style="background-image:url(images/leftedge.png); float: left; width: 79px; height: 641px;"></div> <div id="rightcolumn" style="background-image:url(images/rightedge.png); float: right; width: 79px; height: 641px;"></div> <div id="content" style="background:#000000; float: left; width: 797px; height:800px;">THIS IS THE CONTENT AREA</div> </div> </div> This code only makes the top half of the design, I can't seem to make the middle and bottom parts work. I'd appreciate any suggestions. Thanks. I'm trying to renovate my existing site "deepwaterchurch dot com", and part of it involves making the box on the site able to expand as more content is added to the content area. My best attempt at my new code is at "deepwaterchurch dot com slash next". I have successfully made the top of the design, but I can't figure out how to repeat the border section on the lower left and right (the part that will actually expand) in response to more content being added, then finish the bottom off with the lower border. I have created the files "leftedgelow.png", "rightedgelow.png", and "bottomedge.png" to use. Here's the code I have so far: <head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /> <title>LAYOUT</title> </head> <body style="margin:0px 80px 0px 80px; color:#FFFFFF; background-image:url(images/water.jpg);"> <div id="container" style="width:956px; margin:0px auto -1px auto;"> <div id="topedge" style="background-image:url(images/topedge.png); width:850px; height:15px;position:relative; left:53px;"></div> <div id="leftcolumn" style="background-image:url(images/leftedge.png); float: left; width: 79px; height: 641px;"></div> <div id="rightcolumn" style="background-image:url(images/rightedge.png); float: right; width: 79px; height: 641px;"></div> <div id="content" style="background:#000000; float: left; width: 797px; height:800px;">CONTENT<br />CONTENTCONTENT<br />CONTENTCONTENT<br />CONTENTCONTENT<br />CONTENTCONTENT<br />CONTENTCONTENT<br />CONTENTCONTENT<br />CONTENTCONTENT<br />CONTENTCONTENT<br />CONTENTCONTENT<br />CONTENTCONTENT<br />CONTENTCONTENT<br />CONTENTCONTENT<br />CONTENTCONTENT<br />CONTENTCONTENT<br />CONTENTCONTENT<br />CONTENTCONTENT<br />CONTENTCONTENT<br />CONTENTCONTENT<br />CONTENTCONTENT<br />CONTENTCONTENT<br />CONTENTCONTENT<br />CONTENTCONTENT<br />CONTENTCONTENT<br />CONTENTCONTENT<br />CONTENTCONTENT<br />CONTENTCONTENT<br />CONTENTCONTENT<br />CONTENTCONTENT<br />CONTENTCONTENT<br />CONTENTCONTENT<br />CONTENTCONTENT<br />CONTENTCONTENT<br />CONTENTCONTENT<br />CONTENTCONTENT<br />CONTENTCONTENT<br />CONTENTCONTENT<br />CONTENTCONTENT<br />CONTENTCONTENT<br />CONTENTCONTENT<br />CONTENTCONTENT<br />CONTENTCONTENT<br />CONTENTCONTENT<br />CONTENTCONTENT<br />CONTENTCONTENT<br />CONTENTCONTENT<br />CONTENTCONTENT<br /></div> </div> </div> </body> </html> I'd love some advice, as I'm very much a hobbyist at this. P.S. I know it's dirty to have inline CSS code, but it's much simpler at this stage to tweak. Thanks. Robin Hello. I am 2 problems with my site. In firefox everything is ok in IE6 & IE 7 is is broken. Here are the problems. 1. The search bar. It should look like this(Firefox): URL But in IE it looks like this: URL The HTML code is: Code: <div class="search_menu_banner"> <div class="search_background"> <div class="searchname">Search</div> <form id="searchform" method="get" action="<?php echo $_SERVER['PHP_SELF']; ?>"> <div class="searchbox"> <label> </form> <input type="text" class="searchtextbox" name="s" id="searchtextbox" /> </label> </div> <div class="searchbox"> <input type="image" style="float: left; display:inline; position:relative;" src="<?php bloginfo('template_url'); ?>/images/go.png" alt="Search" /> </form> </div> And the CSS: Code: .search_menu_banner { margin: 0px; padding: 0px; float: left; height: 38px; width: 1004px; } .search_background { background-image: url(images/search.png); background-repeat: no-repeat; padding: 0px; float: left; height: 38px; width: 363px; margin-top: 0px; margin-right: 74px; margin-bottom: 0px; margin-left: 25px; } .searchname { font-family: Arial; font-size: 12px; font-weight: bold; color: #9a2500; text-decoration: none; float: left; height: 20px; padding-top: 12px; padding-right: 8px; padding-bottom: 0px; padding-left: 50px; margin: 0px; } .searchtextbox { font-family: Arial; font-size: 12px; font-weight: normal; color: #333333; text-decoration: none; margin: 0px; padding: 0px; float: left; height: 19px; width: 200px; border: 1px solid #CCCCCC; } .searchtextbox:hover { font-family: Arial; font-size: 12px; font-weight: normal; color: #333333; text-decoration: none; margin: 0px; padding: 0px; float: left; height: 19px; width: 200px; border: 1px solid #999999; } #searchform { margin: 0px; padding: 0px; overflow: hidden; } .searchbox { font-family: Arial; font-size: 12px; font-weight: bold; color: #9a2500; text-decoration: none; float: left; height: 20px; padding-top: 8px; padding-right: 8px; padding-bottom: 0px; padding-left: 0px; margin: 0px; } And the second problem involves multiple column lists. In FF it looks like this: URL But in IE it only shows the last column: URL The HTML for these is: Code: <ul> <li class="col1"><b>Ale Noastre</b></li> <li class="col1"><a href="http://viatadestudent.com/category/video/">Video</a></li> <li class="col1"><a href="http://viatadestudent.com/category/poze/">Poze</a></li> <li class="col1"><a href="http://viatadestudent.com/category/articole/">Articole</a></li> <li class="col1"><a href="http://viatadestudent.com/upload-2/">Upload</a></li> <li class="col2 coltopper"><b>Compania</b></li> <li class="col2"><a href="http://viatadestudent.com/despre-noi/">Despre Noi</a></li> <li class="col2"><a href="#">Advertising</a></li> <li class="col2"><a href="#">Termeni</a></li> <li class="col2"><a href="http://viatadestudent.com/contact/">Contact</a></li> <li class="col3 coltopper"><b>Mai Multe</b></li> <li class="col3"><a href="#">Concurs</a></li> <li class="col3"><a href="#">Anunturi</a></li> <li class="col3"><a href="http://feeds.feedburner.com/vds" target="_blank">Abonament</a></li> <li class="col3"><a href="#">Evenimente</a></li> <li class="col4 coltopper"><b>Coloana4</b></li> <li class="col4"><a href="#">In Curand</a></li> <li class="col4"><a href="#">In Curand</a></li> <li class="col4"><a href="#">In Curand</a></li> <li class="col4"><a href="#">In Curand</a></li> <li class="col5 coltopper"><b>Prieteni</b></li> <li class="col5"><a href="http://www.incomplex.ro/" target="_blank">In Complex</a></li> <li class="col5"><a href="http://www.wnmag.net/" target="_blank">Web News Magazine</a></li> <li class="col5"><a href="http://www.incomplex.ro/" target="_blank">In Complex</a></li> <li class="col5"><a href="http://www.incomplex.ro/" target="_blank">In Complex</a></li> <li class="col6 coltopper"><b>Parteneri</b></li> <li class="col6"><a href="http://www.cadrix.ro/" target="_blank">Cadrix Media</a></li> <li class="col6"><a href="http://www.tecvortex.com/" target="_blank">TecVortex</a></li> <li class="col6"><a href="http://www.cadrix.ro/" target="_blank">Cadrix Media</a></li> <li class="col6"><a href="http://www.cadrix.ro/" target="_blank">Cadrix Media</a></li> </ul> And the CSS: Code: #footer ul { padding: 0px 0px 0px 0px; font-size: 11px; list-style: none; } #footer li { line-height: 1.3em; margin: 0px; padding: 0px 0px 0px 0px; background-repeat: no-repeat; list-style: none; } #footer li.reset { margin-top: -6.5em; } #footer html ul li { position: relative; } #footer li.col1 {margin-left: -35em;} #footer li.col2 {margin-left: -20em;} #footer li.col3 {margin-left: -5em;} #footer li.col4 {margin-left: 10em;} #footer li.col5 {margin-left: 25em;} #footer li.col6 {margin-left: 40em;} #footer li.coltopper {margin-top: -6.5em;} #footer li.a { color: #FFFFFF; text-decoration: none; } #footer li.a:visited { color: #FFFFFF; text-decoration: none; } #footer li.a:hover { text-decoration: underline; } Yo ucan see the problems on the site: http://www.viatadestudent.com Please help. Thanks Hi there I have done my first CSS based design, it has bassed w3c validation both for the html and css. It looks exactly how I want in firefox, but in IE7 it is all messed up. I would be really grateful if someone could take a look and let me know where I am going wrong. There are two issues in IE7 1. Content seems to go under the footer and lose the correct background. 2. Horizontal navigation menu button look weird. You can view the page at 82(dot)147(dot)22(dot)10/~ifasouth/ as I have not redireceted DNS yet ok i have a problem, i have the layout working as i want perfectly in IE and it looks good :P but it does not work at all in firefox, im a complete newb when it comes to css, havn't' done much work with it at all :P heres my site, it has waht i have so far up on it for you guys to have a look to see waht the problem is www.zombies-ate-my-brain.com heres the jist of it URL all my images on the site are all backgrounds to the css divs, all the content is in its own div and i will be ontop of all the images, but im trying to get it, that as i add more content in teh content div the div with the bar addon bit will just keep repeating, if that makes sence, if you look on my site using IE you will see it works, but if you look using firefox you see it wont, lemme post my code for you.. 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>Zombies-Ate-My-Brain.com - Brainless Since 1993</title> <link rel="stylesheet" type="text/css" href="stylesheets/stylesheet.css" title="styles" /> </head> <body> <div id="content_layout"> <div id="texttop"> This Site is a high bandwidth site, Fast connection required.<br/> This site is best viewed at 1024x768.</div> <div id="title"> </div> <div id="bg_interface_top"> </div> <div id="bg_interface_repeat"> <div id="bg_interface_middle"> <div id="text"> <?PHP include("cutenews/show_news.php"); ?> </div> </div> </div> <div id="bg_interface_bottom"> </div> </div> </body> </html> NOW THE CSS SHEET which you can find here >> www.zombies-ate-my-brain.com/stylesheets/stylesheet.css Resolved. hey guys, I am learning how to design a website right now, and to get started I take layouts that still exists and replacet them. I want to create a layout such such as that: http://www.girlfriendnyc.com My code looks like that Code: #global { background: none repeat ,#262626; display: block; height: 99px; left: 0; position: absolute; top: 0; width: 100%; } #global .nav-wrapper { background-color: #222222; height: 99px; margin: auto; width: 1200px; } Code: <html> <head> <link rel="stylesheet" type="text/css" href="anna.css" /> </head> <body> <div id="global"> <div class="nav-wrapper"> <ul> <li> <h2> Contact us </h2> </li> <li> <h2> Follow us </h2> </li> <li> <h2> Read our blog </h2> </li> </ul> <ul> <li> <h2> Learn about us </h2> </li> <li> <h2> See our portfolio</h2> </li> </ul> </div> </div> <body> </html> My Problem is why do these 2 Boxes do not fit together? greetings and thx in advance Resolved. Mods please delete! Thanks. Can anyone tell me why www.thecharliepoweragency.com wont auto stretch in firefox, it also has layout problems in ie5mac and safari. This picture((URL address blocked: See forum rules) ) will show you the page layout at the moment, Here you can see a lot of lines in paint i did. Edit2: The picture damaged page formatting so here it is: img206.imageshack.us/img206/107/57260190dy8.png The Pink lines are what i ideally want to happen, however, my "posts" are overlapping into my right hand navigations (the red dotted lines). I fixed this with a z-index for now but i really need a solution to this Id prefer it if i had some kind of Div tag which Held the two content areas seperate (as posts will wrap around the navigations) this is displayed in the orange boxes. If anyone could offer some help id greatly appreciate it its just annoying me .... and ive only just learnt CSS layouts so i can only fix so much Code was a bit long, but as i cant Link to it for some reason ill spam it he Code: body{ background-color: #1c1c1c; padding: 0; margin:0; color: #A2E700; } #topBar{ height:50px; background-color: #666666; color: #A2E700; overflow: hidden; border-bottom: 5px solid #B4E67F; background-image: url(topBarBG.png); } .topNav{ margin: 0; padding: 0; height: 100%; background-color: #666666; float: left; } .topNav img{width: 20px; height: 20px; text-align: center; border: 0; margin: 0;} .topNav li a{ float: left; color: #FFFFFF; padding: 0px 10px 0px 10px; text-align: center; border-top: 5px solid #EEEEEE; height: 100%; text-decoration: none; border-right: 1px solid #EEEEEE; background-color: #90D900; } .topNav li{display: inline;} .topNav li a:hover{ background-color: #B4E67F; } #IntroBox{ width: 100%; height: 200px; background-color: #EEEEEE; border-bottom: 2px solid #B4E67F; } .IntroHeader{position: absolute; text-indent: 150px; top:85px; font:normal 400% georgia,Verdana,Arial,Sans-serif;} #contentArea{ width: 100%; } #rightIntro{ float:right; width: 380px; height: 100%; background: url(needles.jpg); border-width: 0px 0px 0px 5px; border-color: #B4E67F; border-style: solid; position: relative; } #leftIntro{color: #90D900;} #content{position: relative;} #MenuRR, #MenuRL{ z-index: 2; position: relative; float:right; width: 190px; height:250px; border-width: 0px 0px 5px 1px; border-color: #B4E67F; border-style: solid; text-align: center; } #MenuRL{background-color: #EEEEEE;} #MenuRR{background-color: #EEEEEE;} #MenuRR img{padding: 5px 0px;} #MenuRL ul { list-style: none; border:0; padding:0; margin:0; } #MenuRL li { margin: 0; } #MenuRL li a { display: block; padding: 0 5 0 0; background-color: #B4E67F; text-decoration: none; color: #666666; border-bottom: 1px dashed #90D900; font: normal 75% georgia,Verdana,Arial,Sans-serif; width: 190px; height: 20px; text-align: center; } #MenuRL li a:hover{ background-color: #90D900; letter-spacing: 4px; } #MenuRL h4, #MenuRR h4{text-align: center; color: #EEEEEE; background-color: #666666; width: 100%; padding:0; margin: 0;} .post{z-index: 1; border-bottom: 1px dashed #CCCCCC; position:relative;} .post h3 { margin: 0; padding:0; color: #A7B78D; font: 24pt fantasy; } .postContent{color:#A2E700;} .postInfo{padding: 0; margin:0;color: #336699; top:-15px; left:10px; position:relative; font: 75% georgia;} #footer{clear:both; width: 100% height: 25px; background-color: #666666; text-align:center; color: #CCCCCC;} and HTML: 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" lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" type="text/css" title="main" href="style.css" /> <link rel="alternate stylesheet" type="text/css" href="alternate.css" title="other" /> <title>test Page 2</title> </head> <body> <div id="topBar"> <ul class="topNav"> <li><a href="#"><img src="home.png"/><br>Home</a></li> <li><a href="#"><img src="about.png"/><br>About</a></li> <li><a href="#"><img src="email.png"/><br>Contact Us</a></li> </ul> </div> <div id="IntroBox"> <div id="rightIntro"> </div> <div id="leftIntro"> <!-- next tables in here (in div form ;))--> <span class="IntroHeader">Welcome!</span> <img src="laptop.png" />To the portfolio for XXXXXXXXX, A Bsc Computing student at Portmouth. </div> </div> <!--END ALL TOP STUFF - ABOVE = INTRO, BELOW = Content--> <div id="contentArea"> <div id="MenuRR"> <h4 class="navTitle">:: Linkpad ::</h4> <a href="http://www.spreadfirefox.com/?q=affiliates&id=0&t=219"><img border="0" alt="Firefox 2" title="Firefox 2" src="http://sfx-images.mozilla.org/affiliates/Buttons/firefox2/ff2b80x15.gif"/></a> <br /><img src="w3c_xhtml11_valid.gif" /> <h4 class="navTitle">:: Poll Booth ::</h4> Stuff </div> <div id="MenuRL"> <h4 class="navTitle">:: Navigation :: </h4> <ul> <li><a href="#">Home</a></li> <li><a href="#">About</a></li> <li><a href="#">Portfolio</a></li> <li><a href="#">Forum</a></li> <li><a href="#">Contact</a></li> </ul> </div> </div> <div id="content"> <div class="post"> <h3>Automated, Anyone?</h3><span class="postInfo">Posted By: Rich on 01/12/07 in Category: General</span> <div class="postContent"> Welcome to the first proper post on my portfolio, this system will all be automated through a php and SQL backend. At the moment this text is just a placeholder for whats to come. As are half the ****ty graphics that are yet to be replaced! </div> </div> <div class="post"> <h3>Random</h3><span class="postInfo">Posted By: Rich on 29/11/07 in Category: General</span> <div class="postContent"> Blah Blah Blah!Blah Blah Blah!Blah Blah Blah!Blah Blah Blah!Blah Blah Blah!Blah Blah Blah!Blah Blah Blah!Blah Blah Blah!Blah Blah Blah!Blah Blah Blah! <br> <br> lollololo lollololo lollololo lollololo lollololo lollololo lollololo lollololo lollololo lollololo lollololo lollololo lollololo lollololo lollololo lollololo lollololo lollololo lollololo lollololo lollololo lollololo lollololo lollololo lollololo lollololo lollololo lollololo lollololo lollololo lollololo lollololo lollololo <br><br> </div> </div> </div> <div id="footer"> <img src="info.png" />Design by XXXXXXXXXXX. Optimized for 1024 x 768 or above resolutions operating in 32bit colour and above. </div> </body> </html> Footnotes: it's not 100% valid XHTML, and i know this... but from experience i know it doesnt have to be 100% valid for the CSS to work fully... as long as its Hello all, Its my first post here so you'll have to bear with my ignorance for code! (im just a lowly designer struggling to learn HTML) Heres the site im having problems with http://www.madewithpixels.co.uk ive been hammering away at this over the last two weeks trying to sort out all sorts of cross browser problems... the aim being to get the whole thing rendering exactly the same on all browsers / all platforms... Ive sorted the cross browser issues... but am having problems with layout of the page on MAC Internet Explorer 5.2 (everything is a-ok in safari) The problem is (for those of you without access to a mac) the main navigation links in the top frame. they are aligned perfectly well on my PC in all browsers... but in MAC IE5.2 the alignment is all over the place.... I was originally using <span>'s to set the line spacing / padding of each line, but to ensure cross browser support I had to swith to using <DIV>'s inside a .container style in the CSS.... i am positive that this is where the problem lies as the text lined up perfectly on the MAC before i switched from <SPAN> to <DIV>'s ANY help at all here would be greatly appreciated... i am soooo close yet so very far away! thanks Mike **edit** ive just been playing around with this for an hour and found that changing the text size within IE MAC to say 90% and then changing it back to 100% seems to correct the problem.... curious, now im even more baffled than before! This may be a wordpress issue or it may be an issue with my coding that I've modified in my css/settings for the theme, but I can't get the site to display consistently across all three major browsers (Firefox, IE, Chrome). My site: www(.)cinemasight(.)com For some reason, Firefox is adding a margin (20px maybe?) to the "Content" div. This isn't present in IE and Chrime is adding an image to the background of the "Content" div that isn't present in any of the CSS that I can find. Similarly, in the upper right hand section, with the Facebook, RSS and Twitter links, the Google Search bar is displaying entirely differently on all three browsers. Code posted below: |