CSS - 3 Small Errors, Suggestions Welcome! (please ^_^)
na
Similar TutorialsAm putting the finishing touches to my site but in firefox 8 the top of the side menu there is a space and login part is to low as well. My site is www.carswapped.co.uk Hey, everyone! I was wondering if someone could advise how I could vertically center this page using CSS. I'm trying to create the look of gotgosh dot com but in CSS. Thank you! Kyler Here's the CSS code: * { margin: 0; padding: 0; } body { background: #666666 repeat-x; color: #000000; } #center { position: absolute; width: 100%; float: none; } #outercontainer { width: 760px; margin: 0 auto 0 auto; } #menu { height: 70px; background:#FF0000; } #container { position: relative; height: 500px; overflow: auto; border: 10px solid #FFFFFF; background-color: #FFFFFF; } #barst { height: 20px; width: 100%; background: #00FF00; } #barsb { height: 20px; width: 100%; background: #00FF00; } Here's the HTML code: <head> <title>enter title here</title> <meta name="description" content=" " /> <meta name="keywords" content=" " /> <meta http-equiv="Content-Language" content="en-gb" /> <meta http-equiv="Content-Type" content="text/html; charset=windows-1252" /> <link rel="stylesheet" type="text/css" href="style.css" /> </head> <body> <div id="center"> <div id="barst"> </div> <div id="outercontainer"> <div id="menu">---- HEADER --- -----------------</div> <div id="container"> <p>Vivamus pellentesque sem id massa. Aliquam nisi. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Quisque sem. Curabitur tellus. Proin sit amet libero. Vivamus massa mi, pharetra in, ultricies vitae, vestibulum non, lectus. Nam quis ante ut nisl pharetra congue. Praesent laoreet mi vitae nisi. Sed fermentum massa. Vivamus pellentesque sem id massa. Aliquam nisi. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Quisque sem. Curabitur tellus. Proin sit amet libero. Vivamus massa mi, pharetra in, ultricies vitae, vestibulum non, lectus. Nam quis ante ut nisl pharetra congue. Praesent laoreet mi vitae nisi. Sed fermentum massa.Vivamus pellentesque sem id massa. Aliquam nisi. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Quisque sem. Curabitur tellus. Proin sit amet libero. Vivamus massa mi, pharetra in, ultricies vitae, vestibulum non, lectus. Nam quis ante ut nisl pharetra congue. Praesent laoreet mi vitae nisi. Sed fermentum massa. Vivamus pellentesque sem id massa. Aliquam nisi. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Quisque sem. Curabitur tellus. Proin sit amet libero. Vivamus massa mi, pharetra in, ultricies vitae, vestibulum non, lectus. Nam quis ante ut nisl pharetra congue. Praesent laoreet mi vitae nisi. Sed fermentum massa.Vivamus pellentesque sem id massa. Aliquam nisi. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Quisque sem. Curabitur tellus. Proin sit amet libero. Vivamus massa mi, pharetra in, ultricies vitae, vestibulum non, lectus. Nam quis ante ut nisl pharetra congue. Praesent laoreet mi vitae nisi. Sed fermentum massa. Vivamus pellentesque sem id massa. Aliquam nisi. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Quisque sem. Curabitur tellus. Proin sit amet libero. Vivamus massa mi, pharetra in, ultricies vitae, vestibulum non, lectus. Nam quis ante ut nisl pharetra congue. Praesent laoreet mi vitae nisi. Sed fermentum massa.Vivamus pellentesque sem id massa. Aliquam nisi. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Quisque sem. Curabitur tellus. Proin sit amet libero. Vivamus massa mi, pharetra in, ultricies vitae, vestibulum non, lectus. Nam quis ante ut nisl pharetra congue. Praesent laoreet mi vitae nisi. Sed fermentum massa. Vivamus pellentesque sem id massa. Aliquam nisi. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Quisque sem. Curabitur tellus. Proin sit amet libero. Vivamus massa mi, pharetra in, ultricies vitae, vestibulum non, lectus. Nam quis ante ut nisl pharetra congue. Praesent laoreet mi vitae nisi. Sed fermentum massa.<br /> <br /> Vivamus pellentesque sem id massa. Aliquam nisi. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Quisque sem. Curabitur tellus. Proin sit amet libero. Vivamus massa mi, pharetra in, ultricies vitae, vestibulum non, lectus. Nam quis ante ut nisl pharetra congue. Praesent laoreet mi vitae nisi. Sed fermentum massa. Vivamus pellentesque sem id massa. Aliquam nisi. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Quisque sem. Curabitur tellus. Proin sit amet libero. Vivamus massa mi, pharetra in, ultricies vitae, vestibulum non, lectus. Nam quis ante ut nisl pharetra congue. Praesent laoreet mi vitae nisi. Sed fermentum massa.Vivamus pellentesque sem id massa. Aliquam nisi. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Quisque sem. Curabitur tellus. Proin sit amet libero. Vivamus massa mi, pharetra in, ultricies vitae, vestibulum non, lectus. Nam quis ante ut nisl pharetra congue. Praesent laoreet mi vitae nisi. Sed fermentum massa. Vivamus pellentesque sem id massa. Aliquam nisi. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Quisque sem. Curabitur tellus. Proin sit amet libero. Vivamus massa mi, pharetra in, ultricies vitae, vestibulum non, lectus. Nam quis ante ut nisl pharetra congue. Praesent laoreet mi vitae nisi. Sed fermentum massa.Vivamus pellentesque sem id massa. Aliquam nisi. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Quisque sem. Curabitur tellus. Proin sit amet libero. Vivamus massa mi, pharetra in, ultricies vitae, vestibulum non, lectus. Nam quis ante ut nisl pharetra congue. Praesent laoreet mi vitae nisi. Sed fermentum massa. Vivamus pellentesque sem id massa. Aliquam nisi. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Quisque sem. Curabitur tellus. Proin sit amet libero. Vivamus massa mi, pharetra in, ultricies vitae, vestibulum non, lectus. Nam quis ante ut nisl pharetra congue. Praesent laoreet mi vitae nisi. Sed fermentum massa.Vivamus pellentesque sem id massa. Aliquam nisi. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Quisque sem. Curabitur tellus. Proin sit amet libero. Vivamus massa mi, pharetra in, ultricies vitae, vestibulum non, lectus. Nam quis ante ut nisl pharetra congue. Praesent laoreet mi vitae nisi. Sed fermentum massa. Vivamus pellentesque sem id massa. Aliquam nisi. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Quisque sem. Curabitur tellus. Proin sit amet libero. Vivamus massa mi, pharetra in, ultricies vitae, vestibulum non, lectus. Nam quis ante ut nisl pharetra congue. Praesent laoreet mi vitae nisi. Sed fermentum massa.</p> </div> </div> <div id="barsb"> </div> </div> </body> </html> I don't really have a designers eye, so stuff I make tends to look like crap, but I try and make sure it's fuctional. I have a quick thing I made for an internal project at work, but need some suggestions on the design. It's mostly CSS based, but right now I see at least one problem with it: The side bar is positioned using fixed positioning, so if I fill up the bar, the stuff that falls off the end won't be available anymore. I don't want to use overflow: auto/scroll because it would make a nasty scrollbar in the middle of the page rather than on an edge. My server isn't working right now so I can't upload the copy of the page/css I made to it, so I will attach a zip file of the files. Any suggestions for improving this so that the problem I see is elimated, but a decently looking page still exists would be appricated. I have a design that I need to slice out. I had done this previously making the logo (the cocktail glass/flag/name/ball and green) in a sep div using a .png background and z-index layer for positioning. The problem is, in IE it came up with the ActiveX prompt to present, and in FF, It didn't show up. What I'm trying to do is, keep the dropshadow on the logo over the rest of the imagery. Am I over thinking this??? http://www.rustbug.com/the19thhole/index.html Hello, I have attached my zip file and this is my first attempt on CSS2 (plenty of comments in the code), if some could look at it and recommend any suggestion and why that would be TERRIFIC. My main question is, what happens if the is say...4-5 paragraphs of text on the home page, under "Company Overview", the page then looks stupid, how do i extend the containers around the #middleContainer so that it looks intact. If you want to see the page it is also accessible at http://awo.loadedtechnologies.com/ Thanks you for your Help Hi, This is my first CSS layout. I would like to know if there is a better way to code this or what improvements or changes should be done. Thank you, Lutek <html> <head> <title>Title</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <style type="text/css" media="screen"> body { margin-top: 0; text-align: center; background-color: #d30000; } #container{ margin: 0 auto; width: 650px; height: 800px; text-align: left; background-color: #FFFFFF; } #header { float: left; width: 100%; background: #FF9900; } #box-left { float: left; width: 33.3%; background: #FF0000; } #box-center { float: right; width: 33.3%; background: #ffff93; } #box-right { float: right; width: 33.3%; background: #ffff93; } #footer { float: left; width: 100%; background: #FF2200; } </style> </head> <body> <div id="container"> container <div id="header">header</div> <br> <div id="box-left"> box-left</div> <div id="box-center">box-middle</div> <div id="box-middle">box-right</div> <div id="footer">footer</div> </div> </body> </html> http://www.mihomeanddesign.com/test/ I was hoping someone would have a suggestion as to how to lay this site out without using absolute positioning for the #mainimage div. I know that I could float it right within the main wrapper, but I also want the top nav and the footer to extend 100%. I want to do this to avoid having to put "style="padding-bottom: 423px; " in every <p> at the bottom of the page if there is not a lot of text on it... like on the home page and the contact page. Any suggestions would be greatly appreciated. I've just been given the assignment to write a script that given a set of form elements by the user it will create a page with those form elements displayed and a submit button on the bottom. The form elements the user defines can be text fields, text areas, dropdown boxes, option groups, and checkboxes. The user also gives me a title for each form element. He can give me these form elements in any order and I need to display them in that order on the page. My question is, how do I arrange these form elements so they always look good together and I don't have funny gaps or unprofessional looking design? It would be easy if it was just text fields and area, but then I have to throw in option groups and checkboxes that can be any number in a row. Does anyone have some good form organization rules that could help me? Thanks!! moved on.... Hi Guys, Hope someone can help out here.. I am trying to create a page with a header and footer and a middle portion for the content. I am not used to using CSS and I thought I had it working but when I test in IE it doesn't quite work as expected.. The footer removes itself from the bottom of the page and the scrollbars for the maincontent extend below the footer.. You'll see what I mean if you open this in IE: http://www.modelglamorous.com/div_test.htm http://www.modelglamorous.com/css/mainstyle.css It works perfectly in Firefox but not in IE.. I think it's something simple but I am not sure how to fix it.. TIA, N. battleglory.mattaproductions.com/layout Somewhere in the coding I made a issue somewhere and I don't know where. In firefox the layout shows up fine, but in Internet Explorer there is like a pixel gap between the top content image and the text. Appreciate anyone's help....thanks. Matta EDIT: Special thanks to ryan-reese-09 and kk5st for the wonderful support they both gave. What happen was a gap below the images in IE and firefox displayed just fine. I added: img{ vertical-align: bottom; } Fixed the issue immediately. But than my images were to close so than I added: #special_feature_btm img { padding: 0px 0px 10px 0px; } #content_btm img { padding: 0px 0px 10px 0px; } This gave a 10px space to the bottom of the images. Remember top, right, bottom, left (clockwise). So the rest I didn't need to change. I hope I summarized this up well and hope it helps you guys out sometime. Thanks again! Matta Well I got sick of reading through tons of <td> and <tr> tags today so I sat down and tried to write my first CSS script ever. I got the basic idea of it and tweaked it using Firefox/Firebug to get it working great. The problem was I checked back in IE (since most people use it =/...) It looked all messed up and I tried changing a lot of things around and I just got frustrated. Since I am new to this whole thing with CSS, I don't know what to look for or change. I know that the top links are messed up but I will fix those after I get my layout working in both browsers. Can anyone help me out? www.etwcweb.com/ETWC.html Here is the CSS code also: Code: /* Main Part */ body { font-family: Arial, Helvetica, sans-serif; background: #333333 url(Images/mainbacknew.png) repeat-y; font-size: 14px; margin: 0px; } h1 { font-size: 115% font-weight: bold; color: #000000; } p, ol, ul { line-height: 145% } a { color: #FFFFFF; font-weight: bold; text-decoration: none; } a:hover { color: #CCCCCC; font-weight: bold; text-decoration: none; } ul { list-style-image:none; list-style-position:outside; list-style-type:none; margin-left:0pt; padding-left:0pt; } ul li { list-style: url(Images/bluearrow.png); padding-left:15px; } img { border:medium none; } img.left { float:left; margin:5px 9px 0pt 0pt; } img.right { float:right; margin:5px 9px 0pt 0pt; } hr { display:none; } /* Floating part of Page */ #main_content { width: 800px; margin: 0pt auto; background: url(Images/bg_content.jpg) repeat; } #main_content a { color: #000000; text-decoration: underline; } #main_content a:hover { color: #666666; } /* The Top Picture */ #top_area { background: url(Images/CSSHeader.png); height: 433px; width: 100%; } #top_area li { display: block; } #top_area a { color: #FFFFFF; display: block; float: left; padding: 40px 20px 0pt; text-decoration: none; } /* Search Form */ .search { float: right; padding-right: 20px; margin-top: 50px; margin-bottom: 50px; } .search h1 { color: #FFFFFF; font-size: 150%; } /* Top Links */ #main_links { /* background-color: #000000; opacity: 0.7; */ width: 800px; margin: 0pt auto; } #main_links ul { list-style-image: none; list-style-position: outside; list-style-type: none; margin-left: 0pt; padding-left: 0pt; } /* Right Side of Floating Page */ #stories { background: transparent url(Images/bg_content.jpg) repeat; width: 535px; padding: 30px; float: right; margin: 0pt auto; } #stories h2 { padding-left: 20px; padding-top: 15px; } /* Left Side */ #left_bar { background: transparent url(Images/bg_content.jpg) repeat; float: left; width: 205px; margin: 0pt auto; } .left { padding-right: 10px; padding-top: 0px; } .left_list { padding: 20px; } .left_list ul li { border-top: 1px solid #CCCCCC; padding: 10px 15px; } #left_bar h1 { background: url(Images/LeftHeaders.png) repeat-x; padding-left: 20px; padding-top: 5px; color: #FFFFFF; } /* Message */ #top_footer { width: 800px; margin: 0pt auto; background-color: #666666; color: #FFFFFF; font-size: 90%; font-weight: bold; padding-top: 4px; padding-bottom: 4px; text-align: center; line-height: 150%; } /* Bottom Links */ #links { width: 800px; margin: 0pt auto; text-align: center; background: #000000; color: #FFFFFF; font-size: 90%; line-height: 160%; padding-top: 8px; padding-bottom: 3px; } #links a, #links a:hover { text-decoration: none; font-weight: bold; } #links .contact { } #links .contact a, #links .contact a:hover { text-decoration: underline; color: #0000CC; } Thanks in advance guys and sorry if this is already posted here, but my brain is frazzled and I couldn't find it with a quick search or three Howdy folks. If you check http://www.clansunited.net/ and http://www.clansunited.net/phorum/read.php?55,20178,20178#20178 you will notice that it doesnt really appear as it should as in IE. Now there are 2-3 small minor errors left otherwise everything is valid. How do I make the space between the menu and the rest of the site appear as in IE without messing it up in IE? Any feedback is welcome. Hi, I'm new to using forums, and need a little help trying to fix an IE6 problem. My code is all valid, and i'm using xhtml strict. my page works fine in all the main browsers (including ie:7/8) just not ie6. Here is the problem i have. I have a div (links) which is 956px wide and i am floating 5 other divs (1-5) within the links div. The widths and padding for all of the 5 divs equals 956px's But for some reason the last div (lower5) is dropping out of alignment, it looks like ie6 thinks there is not enough room for all of the 5 divs to fit within the outer div. As you can see i have tried using line height:0; and that did not help. Here is my code...........Any idea's HTML: <div id="lower-links"> <div id="lower1"></div> <div id="lower2"></div> <div id="lower3"></div> <div id="lower4"></div> <div id="lower5"></div> </div> CSS: #links { margin:0; padding:0; background-color: #FFFFFF; width: 956px; height:374px; float: right; line-height:0; } #lower1,#lower3 { background-color: #FFFFFF; width: 161px; height:308px; float: left; padding-top:33px; padding-left:15px; padding-right:15px; line-height:0; } #lower2,#lower4 { background-color: #FFFFFF; width: 162px; height:308px; float:left; padding-top:33px; padding-left:15px; padding-right:15px; line-height:0; } #lower5 { background-color: #FFFFFF; width: 160px; height:308px; float: right; padding-top:33px; padding-left:15px; padding-right:15px; line-height:0; } So I made a test design for a site, which I uploaded for testing HERE. The problem is that for a few borders to the navbar and such, an image needed to overlap them, so instead I made them very short div's and cut the image to fit inside the div, about 2px in height. Although this displays fine in firefox, in IE the small images do not show. At first it looked even worse in IE, until I implemented overflow: hidden; to make the div shrink to its actual size. Any recommendations? Is there a better way to do this, or an easy fix? Thanks in advance Hello, I couldn't think of a more appropriate title, so I apologize - but as it says, I have a series of small questions regarding my CSS layout and would be most grateful if someone could assist me. I'll start with the biggest one. (See Image) http://img379.imageshack.us/img379/9779/46432769lm3.png As you can see, when viewing my layout in Google Chrome or Safari, everything in between the header and the footer gets caught on my top menu. I tried to correct it, but I am really unaware of the problem's source; if anyone knows I'd appreciate it. The topmenu CSS is he Code: .topmenu { float:left; padding:0; margin:0; color: #FFFFFF; background: #0000A0 url(/menbg.png); width:898px; border:solid 1px #363636; clear:both; } .topmenu a, .topmenu a:visited { font-family:Arial, Helvetica, sans-serif; font-style:normal; font-weight:bold; font-size:12px; color: #FFFFFF; background: #0000A0 url(/menbg.png); text-decoration: none; } .topmenu ul { list-style-type:none; padding:0; margin:0; } .topmenu ul li { float:left; position:relative; z-index:auto !important /*Non-IE6*/; z-index:1000 /*IE6*/; border-right:solid 1px #363636; } .topmenu ul li a { color: #FFFFFF; background: #0000A0 url(/menbg.png); float:none !important /*Non-IE6*/; float:left /*IE-6*/; display:block; height:30px; line-height:30px; padding:0 10px 0 10px; text-decoration:none; } .topmenu ul li ul { display:none; border:none; color: #FFFFFF; background: #0000A0 url(/menbg.png); } .topmenu ul li:hover a { background-color:#008000; text-decoration:none; color:#FFFF00; } .topmenu ul li:hover ul { display:block; position:absolute; z-index:999; top:29px; margin-top:1px; left:0; } .topmenu ul li:hover ul li a { display:block; width:12em; height:auto; line-height:1.3em; margin-left:-1px; padding:5px 10px 5px 10px; border-left:solid 1px #363636; border-bottom: solid 1px #363636; background-color:#0000FF; color:#FFFFFF; } .topmenu ul li:hover ul li a:hover { background-color:#CA0000; text-decoration:none; color:#FFFF00; } .topmenu table { position:absolute; top:0; left:0; border-collapse:collapse; color: #FFFFFF; background: #0000A0 url(/menbg.png); } .topmenu ul li a:hover { background-color:#008000; text-decoration:none; color:#FFFF00; } .topmenu ul li a:hover ul { display:block; width:12em; position:absolute; z-index:999; top:29px; left:0; } .topmenu ul li a:hover ul li a { display:block; width:12em; height:1px; line-height:1.3em; padding:4px 16px 4px 16px; border-left:solid 1px #363636; border-bottom: solid 1px #363636; background-color:#0000FF; color:#FFFFFF; } .topmenu ul li a:hover ul li a:hover { background-color:#CA0000; text-decoration:none; color:#FFFF00; } The next two things aren't really significant. (See Image) http://img73.imageshack.us/img73/1725/50804367ww7.png (Shown in red) If possible, I would like to remove that space in the center column and expand the width of the blockquote section in my sidebar, but I can't seem to find out how. Website: http://banjouniverse.110mb.com/css2.php CSS: http://banjouniverse.110mb.com/master2.css Wondering if anyone can tell me why there is a gap above my header image. Surely I am missing something in Firebug? h**p://www.topofferspage.com hey just got a small problem i dont know hw to fix, take a look at my site http://funnyguys99.tripod.com/index.htm if u hover over the links on the left side of the page, the border around them is not even. I want the border to end at the same spot when u hover over them, no matter how many more letters there are in the link. Here's the Css for the left bar, please fix it [CODE] div#menubar { padding-right: 0.5em; padding-left: 0.5em; padding-bottom: 20%; margin: 120px 0px 0px 0px; padding-top: 0.5em; left: 0px; width: 8em; top: 0px; height: auto; position:absolute; background:#FFFFFF; border-right:1px solid black; border-bottom:1px solid black; border-top:1px solid black; } div#menubar ul { padding-left:0px; padding-top:0px; list-style:none; line-height: 85%; margin:0px; } div#menubar a { font-weight: bold; text-decoration: none; font-size:0.6em; padding-right:7.5em; padding-top:0px; padding-bottom:0px; } div#menubar a:link { color: #ffa500; } div#menubar a:visited { color:dark red; } div#menubar a:active { font-weight: normal; } div#menubar a:hover { color: white; background:#999999; border:1px solid black; } [CODE] Hi! In this page [www].bezlica.ru/chat/sample.php , left bottom flash window is 3 pixels up of its normal position. In Firefox it renders well. Is there any way to fix in IE, while not affecting Firefox? |