CSS - Browser Size & Alignment Problem
So I've got a page on which a menu exists (or will) that is a certain width, I believe 854px. Now I know that this isn't the best idea, but I'm following someone's specific orders so meh. Now, my problem is that I want the page to resize according to the browser size and fill the page, so if the browser size is 1054 then I want the background image at the top to run the entire width of the page, and the menu, I'd want to center. Now if the browser is 854px or wider, then the page looks fine, but when the browser is anything less, then the menu, because it is a specific width, expands as it should as well as centers itself forcing a horizontal scroll bar, but the rest of the page is acting like it is ONLY 854px and therefore it cuts off and is now no longer centered with the menu.
It must be possible to do, right? Here's a link to the page I'm using for debugging purposes http://www.agentjeff.com/headerv10.html Similar TutorialsSo when using Netscape 7.2 & Opera 7.5 and MSIE 6.0, How do you get a simple tag like body { font-size:small; } to be equal in all browsers? Setting IE Text Size to Medium, and Opera's Zoom to 100% (both defaults) and Netscape 7.2 to 120% (not the default) is one way, but is there a CSS way? By the way, the child element hack "body>div {property}" wasn't working no matter what I tried, by not working I mean to say Netscape never would read it or apply it. It appeared to be that Opera & IE need to read the same value while Netscape needs to apply a larger size to be equal to IE's and Opera's rendering. B Hello all, I have a really anoying alignment issues with fire fox and IE. Have a look at the follwoing page in both browsers: http://pfwd.org.uk/style.htm I need to get IE to display what Firefox shows. The four rows on the left hand side (date, date value, number and number value) need to be aligned with the rows Descirption and description value. Please note not all style code is in the external stylesheet external CSS file: PHP Code: body{ background-color:#006699; font-family:Arial, Helvetica, sans-serif; } .main, header, subHeader{/*Positon values that make every thing go inside the main box */ position:absolute; left:100px; } .main, subHeader dbItem{ border: solid 1px #0099CC; } .main, header{ top:125px; left:140px; width:451px; } .main{ height:300px; } .header{ background-color:#0099CC; font-size:12px; font-weight:800; } .subHeader{ height:22px; width:200px; border: solid 1px #0099CC; background-color:#FFCC66; float: left; font-size:10px; font-weight:700; padding: 2px; } .dbHeader{ border: solid 1px #0099CC; background-color:#FFCC66; font-size:10px; font-weight:600; padding: 2px; width: 50px; } .dbItem{ background-color:#FFFFFF; border: solid 1px #0099CC; font-size:10px; font-weight:700; padding: 2px; width:50px; } .dbdescripHeader{ border: solid 1px #0099CC; background-color:#FFCC66; font-size:10px; font-weight:600; padding: 2px; width: 364px; float:right; } .dbdescripItem{ background-color:#FFFFFF; border: solid 1px #0099CC; font-size:10px; font-weight:700; padding: 2px; width:50px; width: 390px; float:right; height:48px; } .link{ font-size:11px; font-weight:700; font-family:Arial, Helvetica, sans-serif; padding:2px; color:#0099CC; text-decoration:none; float:right; } .links{ background-color:#006699; border: 1px solid #0099CC; border-top:1px solid #0099CC; color:#0099CC; text-decoration:none; padding:0 2px; } .link a:hover{ font-size:11px; font-weight:700; font-family:Arial, Helvetica, sans-serif; padding:0 2px; text-decoration:none; color:#FFCC66; background-color:#006699; } br{ margin-top:-15px; } .subsubheader{ border: solid 1px #0099CC; background-color:#FFCC66; float: left; font-size:10px; font-weight:700; padding: 2px; } page file: PHP 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> <title> </title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" href="style.css"type="text/css" /> </head> <body> <div class='main'> <div class='header'>Updates to the site</div> <div style='margin-bottom:20px;'> <div class='subHeader' style='height:22px;'>Search for an update</div> <div class='dbItem' style='left:180px; width: 239px; float:left; height:22px;'> <form name="search" method="post" action="post"> <select name="Year"> <option>Year</option> <option>2005</option> <option>2004</option> <option>2003</option> <option>2002</option> <option>2001</option> <option>2000</option> </select> <select name="Month"> <option>Month</option> <option>January</option> <option>Febuary</option> <option>March</option> <option>April</option> <option>May</option> <option>June</option> <option>July</option> <option>August</option> <option>September</option> </select> <input type="submit" name="Submit" value="Search" /> </form> </div> </div> <div style='margin-bottom:10px;'> <div class="link"><a href='#' class='links'>GO</a></div> <div class='dbdescripHeader'>Description of update</div> <div class='dbdescripItem'>First set of information from the database</div> <div class='dbHeader'>Number</div> <div class='dbItem'>one</div> <div class='dbHeader'>Date</div> <div class='dbItem'>10/01/01</div> </div> <div style='margin-bottom:10px;'> <div class="link"><a href='#' class='links'>GO</a></div> <div class='dbdescripHeader'>Description of update</div> <div class='dbdescripItem' >Second set of information from the database</div> <div class='dbHeader'>Number</div> <div class='dbItem'>two</div> <div class='dbHeader'>Date</div> <div class='dbItem' >10/01/01</div> </div> <div style='margin-bottom:10px;'> <div class="link"><a href='#' class='links'>GO</a></div> <div class='dbdescripHeader'>Description of update</div> <div class='dbdescripItem'>third set of infroamtion from the database</div> <div class='dbHeader'>Number</div> <div class='dbItem'>three</div> <div class='dbHeader'>Date</div> <div class='dbItem'>10/01/01</div> </div> <!-- End on the fly scripts --> </div> </body> </html> URLS css: http://pfwd.org.uk/style.css page: http://pfwd.org.uk/style/htm Can any one help me sus out the alignment issues? thanks pfwd 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 In my web docs, in FF, the text size can be adjusted in the browser, but not in IE. Why would this be? I'm using points to define font size by the way. Hello, I'm using jquery and the cycle plugin to cycle through a few images on my homepage inside a container.When i load the website at any browser size, it seems to do the proper thing. The problems arise when i try to make the browser bigger or smaller after that, it does funky things to the images. If you begin to scale the browser when the first image is displayed, it also seems to scale properly for that first image, but goes haywire after that. It pretty much does it in all browsers and i can't seem to figure out if it's something im not setting properly within css or if it have something to do with jquery and the cycle plugin. here's the website thus far: www.beaucoupla.com this is my first time writing code so please any help would be appreciated! Code: @charset "utf-8"; /* CSS Document */ #mainWrapper { /* background:#000 right top no-repeat; min-width:1000px; min-height:775px; border:0px; background-color:#000; */ padding: 0 0 0 1px; margin:0; top:0; left:0; width:100%; } .mainbar { position:absolute; top:0px; left:0px; display:none; visibility:hidden; width:78%; min-height:100%; height:auto; /*This works for IE7 min-height:775px; height:775px;*/ border-right: #FFF solid medium; } #imagelist { left:0; position:absolute; display:block; visibility:visible; /* width:auto; static size */ } #imagelist img { display:block; } #imagelist img.first { display:block; } .theimage { position:absolute; left:0; width:100%; /* Adding this works for IE7 */ /* height:775px; */ border-right: solid #FFF medium; } #podcast { /*right:303px; */ position:absolute; top:0px; left:0px; height:100%; } .about_info p { font-size:1.1em; } .contact_info, .about_info, .news_info { position:relative; margin-top:4em; margin-left:10%; width:78%; font-family:Arial, Helvetica, sans-serif; font-weight:bold; font-size:1.3em; color:#FFF; height:100%; } .contact_info #title, .about_info #title, .news_info #title { font-size:1.75em; padding-bottom:1.5em; color:#1ac089; color:#03c5d1; } .contact_info .heading { color:#c04141; font-size:1.2em; } .contact_info .mail { text-decoration:underline; } .contact_info a:hover { color:blue; text-decoration:underline; } .news_info .heading { color:#c04141; } body { /*width:1400px; height:775px;*/ padding:0; margin:0; border:0; background-color:#000; } #share td { padding-left:0.5em; } #share { margin-left:1.4em; margin-top:0; border-top:0; /* padding-top:5; */ font-size:0.65em; } .sidebar { position:relative; font-family:Arial, Helvetica, sans-serif; font-weight:bold; margin-left:78%; margin-top:1em; font-size:2em; color:#FFF; } ul { border:0; margin:2px; text-decoration:none; } li { list-style:none; } a { text-decoration:none; color:#FFF; } a.home:hover { color:#bc7bd4; } a.news:hover { color:#7bd488 } a.podcast:hover { color:#d47b88; } a.blog:hover { color:#d4cb7b; } a.about:hover { color:#7bd4c6; } a.contact:hover { color:#d4a37b; } a.twitter:hover { color:#33ccff; } a.myspace:hover { color:#999; } a.facebook:hover { color:#5b61d5; } I am having few html pages with external CSS used. Now when i want to change the brower text using View->Text size, its not allowing. Yes, i can change the font size in my CSS but I dont want all should see in the same font. Few people viewing those pages may not like that font. So, Can any body help me to find out how to change the text size of an html page having CSS. Hi, Here's the site I'm working with: http://www.cjfusion.com I want to get that image centered on the browser window and then depending on how big the viewers screen is, the browser will cover up the left and the right. I hope that makes sense. I almost want it to be fluid, but I'm unsure how to do that. Ask questions if this doesnt make sense. Its hard to explain. -CJ Hi I am trying to learn how to design and develop a website that has consistent behavior across browsers, browser window size and screen resolution. What are the industry best practices for designing and developing such websites. Your help is appreciated Thanks My page looks great, except in IE 6 where the green header shifts left instead of staying centered. I don't know why!!! It can be viewed at: http://www.descom.org/testing/home.html Roll over "About" and then click on any of its sublinks. The CSS sheets a http://www.descom.org/testing/allianceStyles.css and: http://www.descom.org/testing/ie6.css THANK YOU! I'm using this layout, modified quite a bit for visual design, but the "mechanics" are the same as the author's demo for the most part: http://matthewjamestaylor.com/blog/...rail-pixels.htm The top navigation is a horazontal list aligned to the left. What I would *like* to do is have all of the nav "tabs" aligned to the left as they are now, except the last one, aligned to the right. Sort of like this: TTTT_____T Any ideas? Hi! I'm new to this forum, but I'm hoping you can help me! Included is my CSS coding. I am having a little bit of trouble getting #siteAds to have the correct width after adding borders to the three #mainContent. When I tweak the pixel amount it either runs onto the next line or just doesn't line up properly with #siteNav and #footer. I've tried replacing the pixel counts with percentages; doesn't work. I'm relatively new at CSS so any help would be appreciated. Thanks in advance! Code: <style type="text/css"> body { background-image:url('bg-1.jpg'); background-repeat:no-repeat; background-position:top; background-color:#FFF; background-attachment:fixed; } * { margin: 0px; padding: 0px; } #wrapper { height: 1300px; width: 1000px; margin:0px auto; text-align:left; } #branding { height: 228px; width: 1000px; } #branding #logo { height: 228px; width: 1000px; position: relative; background-image:url('hooplogolarge.jpg'); background-repeat:no-repeat; background-position:top; background-color:#000000; } #siteNav { height: 38px; width: 1000px; color: #FFF; background-color: #000; line-height: 38px; clear: both; font-family: Arial, Helvetica, sans-serif; float: none; text-align: center; word-spacing: normal; font-size: 24px; } #mainContentWrapper { float: none; width: 1000px; background-color: #FFF; } #mainContentWrapper #news { float: left; width: 265px; height: 953px; background-color:#FFF; border: thin dashed #000; padding: 10px; } #mainContentWrapper #mainContent { float: left; width: 488px; height: 953px; background-color:#FFF; padding: 10px; border: thin dashed #000; } #mainContentWrapper #siteAds { float: right; width: 175px; height: 953px; background-color:#FFF; padding: 10px; border: thin dashed #000; } #footer { width: 1000px; font-size: 9px; color: #CCC; text-align: center; line-height: 35px; background-color: #000; clear: both; } </style> OK, I somehow became a css n00b overnight (I've made 4-5 websites heavily using css.) Basically, here is what I want: Code: style :: [ ] [ ] And here is what I'm getting: Code: style :: [ ] [ ] For some reason the boxes won't align with the text. No matter what I do! Here is the link to see: http://www.sential.co.uk/test.php Here is the html: Code: <div id="style_selector"> <p>style :: <a href="#" onclick="setActiveStyleSheet('SE001'); return false;" title="change to style: Underwater - Water Planet"><div id="style_se001">Blue</div></a> <a href="#" onclick="setActiveStyleSheet('SE002'); return false;" title="change to style: Orkidea - Beautiful"><div id="style_se002">Orange</div></a> </p> </div> And here is the css: Code: #style_selector{ position: absolute; top: 70px; left: 160px; height: 25px; width: 100%; text-align: left; } #style_se001{ float: left; height: 15px; width: 15px; text-indent: 10000px; overflow: hidden; background-color: #6187E1; display: block; border: 1px solid #ffffff; } #style_se001:hover{ border: 1px solid #6187E1; } #style_se002{ float: left; height: 15px; width: 15px; text-indent: 10000px; overflow: hidden; background-color: #FCB029; display: block; border: 1px solid #ffffff; } #style_se002:hover{ border: 1px solid #FCB029; } I'm sure it's something simple, yet I've tried switching positioning attributes and everything, and the code for aligning these boxes is IDENTICAL to the menu buttons at the top. I'm totally miffed -Luke Hi Im a newbie to this site and to web page building so Im no sure if this is the right spot to be posting, but I think my problems are css related. Ive designed my web page with a 3 column layout the when I insert text into the left and middle columns the text starts from the top of the page like its ment to, but for some reason when I insert text into the right column it starts from the bottom of the page instead and I cannot work out why? Does anyone have any ideas? Is it css related or html? 2nd Issue how do I get the menu bar to float to the centre of the screen instead of the left? Ive tried so many things and it just make it worse. I know its hard without pics. Hi Please see watermark.sc It works fine in Firefox but header alignment is not proper in IE What might be the problem? San Hi, would you tell me please what do I have to do to make this code look in IE6 the same way as it looks in FireFox 3.0.5 In FireFox fields are as expected - City and ZipCode each on different lines. In IE6 they are on the same line (Zipcode label is on the same horizontal level as City)and the rest of the second line(Zipcode) starts at the beginning of the next line(without offset) Code: <style type="text/css"> .formInput:after, .formInput .formField:after{ clear:both;display:block;visibility:hidden;height:0;content:'.'} .formField {float:left;width:40%;} .formInput{position:relative;} .formInput div.ex{position:static;left:24%; width:5em} .formLabel {float:left;width:25%;text-align:right;} </style> <div style="width:700px"> <form> <div id="cityFld" class="formInput"> <div class="formLabel"><label for="city">City</label></div> <div class="formField"> <input type="text" name="city" id="city" value=""> <div class="ex">city explanation</div> </div> </div> <div id="zipFld" class="formInput"> <div class="formLabel"><label for="city">Zipcode</label></div> <div class="formField"> <input type="text" name="zip" id="zip" value=""> <div class="ex">zip explanation</div> </div> </div> </form> </div> Hi All, I am new to devshed and new to css stuff. I have a problem with a site i am currently building. http://www.foodaffairs.co.za Basically there is a yellow link box underneath the flash image which in FF(Firefox) is out a little to the right and in IE out to the left. The yellow block is actually an image which is the same width as the flash image but just doesn't wanna line up. Anyone had this problem or could help me fix it? Thanks LoTi I have this in my other thread but I decided to make a new thread since my old thread was pertaining to a seperate issue. OK well I have validated my CSS and am now getting no errors on it, warnings about the font-family but that is an easy change and isn't priority right now. That fixed a couple minor things that I had missed. But the current problems a 1.) Every div past the #space div appears to be a couple pixels short in terms of width, as the right border doesn't line up with the border from #topright, #space, #grayfade, and #bannercell. 2.)Now in FF its all screwy. It wont display one div next to another, it puts it in the correct position on the right, but bumps it down below the div it is supposed to be next to. The DTD I have on the page right now is <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> Please let me know if this is confusing or you need anything else. Thanks CSS: Code: html {height:100%;} body{ margin:0; padding:0; height:100%; font-family:Times New Roman, serif; background-color:white; } #wrap{ background-image:url(bgimage.jpg); background-position:top left; background-repeat:repeat-y; min-height:100%; width:790px; margin:auto; } * html #wrap {height:100%} #header{ background-image:url('keyboard.jpg'); background-position:left; background-repeat:no-repeat; background-color: #FEFEFE; margin:0; padding:0; height:117px; width:615px; border-left: 1px solid #777777; float:left; } p{ margin:0px; padding:0; font-family: courier; } p.headline{ margin:0px; padding-left:5px; font-family: arial; font-weight:bold; font-size:70%; } p.news{ margin:0px; padding-left:5px; font-family: arial; font-size:70%; color:#808080; } h1{ position:relative; line-height:0px; margin:0; padding-left:10px; font-size:115%; color:#1B018E; } #left{ float:left; width:200px; text-align:left; background-color:#FFFFFF; border-left: 1px solid #777777; border-right: 1px solid #777777; } #main{ float:right; clear:both; text-align:left; width:565px; border-right: 1px solid #777777; } #clearfooter{ clear:both; height:30px; overflow:hidden; } #footer{ height:30px; background-color: #777777; margin:0 auto; padding:0; margin-top:-30px; color:#FFFFFF; text-align:center; width:790px; } #bannercell{ float:right; clear:both; background-color:white; text-align:right; width:175px; height:117px; font-size:75%; margin:0; padding:0; border-right: 1px solid #777777; } #borderleft{ border-left: 1px solid #777777; } #topright{ float:right; clear:both; background-color:white; text-align:right; width:175px; height:53px; font-size:75%; margin:0; padding:0; border-right: 1px solid #777777; } input.box{ height:17px; } #linkbanner{ width:615px; height:19px; float:left; text-align:left; border-left: 1px solid #777777; background-color: #777777; } #grayfade{ float:right; clear:both; border-right: 1px solid #777777; background-image:url(gray_grad.jpg); width:175px; height:16px; } #space{ border-right: 1px solid #777777; border-left: 1px solid #777777; background-color: #FFFFFF; height:25px; width:790px; } #extraspace{ float:right; clear:both; border-right: 1px solid #777777; background-color: #FFFFFF; height:25px; width:565px; } #newsbar{ background-image:url(blue_grad.jpg); background-repeat:no-repeat; width:200px; height:10px; } #mainbar{ background-image:url(blue_lg.jpg); background-repeat:no-repeat; width:565px; height:10px; border-right: 1px solid #777777; } #mainbarsm{ float:right; clear:both; width:565px; background-image:url(blue_thin.jpg); background-repeat:no-repeat; height:5px; } #heading{ background-color: #FFFFFF; margin:0; padding:0; height:53px; width:615px; border-left: 1px solid #777777; float:left; text-align:left; } and my HTML: Code: <center> <body background="../images/bg_texture2.gif"> <div id="wrap"> <div id="heading"><img src="../images/logo.gif"><font face="Bodoni MT" size="5" color="#040C89"> Company Name</font></div> <div id="topright"><font color="#6666FF">Monday April 4, 2005</font></div> <div id="header"></div> <div id="bannercell"><center>.::Client Login::.</center> <br> <font size="2">username <input type="text" size="13" class="box"> password <input type="password" size="13" class="box"></font> <center><input type="submit" value="Login"></center></div> <div id="linkbanner"><font color="#FFFFFF" size="2">About Us | Services | Solutions | Help Desk | Training | Careers | Contact</font></div> <div id="grayfade"> </div> <div id="space"> </div> <div id="left"> <div id="newsbar"><h1>Recent News</h1></div> <p class="headline">.::New Website::.</p> <p class="news">We're launching a new website in the near future. Look for great things to come!</p><br> <p class="headline">.::Done using CSS::.</p> <p class="news">No tables with this design. "Out with the old and in with the new."</p><br> <p class="headline">.::Continuously Changing::.</p> <p class="news">With us having recent news on the website, the main page will be changing all the time with the latest info about Us and stuff</p><br> <p class ="headline">.::Sales Platform::.</p> <p class="news">We can also use this as an area for sales opportunities and promotion. It will be a good reference for all new products and features from Us.</p> </div> <div id="main"> <div id="mainbar"><h1>Your Cool Slogan</h1></div> <br> <p class="news"><strong>Intuitive.</strong> Having the knowledge and experience in a changing <img src="../images/imis.gif" align="right" border="0"> world to make expert decisions through perceptive insight. We allow your organization to tear down barriers by offering <strong>software solutions, innovative design, and managed services.</strong> Specializing in <i>sutff</i> and ore stuff</i> software we are able to expand the dimensions of your organization, and provide you with the solutions needed for an on demand world. </p> <div id="mainbarsm"></div> <p class="news">Having the knowledge and experience in a changing <img src="../images/microsoft.gif" align="right" border="0"> world to make expert decisions through perceptive insight. We allow your organization to tear down barriers by offering software solutions, innovative design, and managed services. </p> </div> <div id="extraspace"></div> <div id="clearfooter"></div> <div id="footer"> <center><font size="2">2005 Us. All rights reserved.<br> Site produced by a Web Guy, Content Manager.</font></center> </div> </body> </center> Thanks for taking the time to read my question. Have posted 2 examples of my problem. Example 1: http://www.pierced.ca/Kelly/indexCOPY.htm Page http://www.pierced.ca/Kelly/kelly1.htm CSS http://www.pierced.ca/Kelly/kelly1.css CSS (this one will download) Here my rounded corners don't line up to the bottom of the "info" area. Not sure why. Example 2: http://www.pierced.ca/Kelly/indexCOPY2.htm http://www.pierced.ca/Kelly/kelly2.htm CSS http://www.pierced.ca/Kelly/kelly2.css CSS (this one will download) Here my rounded corners line up, but I get an extra space under the "menu" section. Not sure why. I am totally stuck. I am not sure how to fix it. I have tried adding height to the menu, but that doesn't work. Thanks for you help, Brad |