CSS - Background Not Displaying
Similar TutorialsWhat is wrong with this? I can't seem to see any of the background colors in Firefox or Camino? I have tried setting the background color in the body, and by enlosing the rest of the elements within a containing "main" div... but neither seem to work. Any ideas? What is wrong with this? I can't seem to see any of the background colors in Firefox or Camino? I have tried setting the background color in the body, and by enlosing the rest of the elements within a containing "main" div... but neither seem to work. Any ideas? http://buffalonationsmuseum.ca Right now the property is just "background" but I have tried... background-color: I'm using ASP.Net with Firefox and IE. I'm at a loss as to why this isn't working. I did the exact same thing in notepad and it worked fine but when I use ASP.Net, it doesn't show. CSS Code: .headbg { width:auto; height:125px; background-image:('test.png'); } #headercontainer { width:auto; height:125px; text-align:center; background-image:('test.png'); } ASP.Net code Doesn't display Code: <div class="headbg"> test </div> Doesn't display Code: <div id="headercontainer"> test </div> Displays Code: <img src=test.png /> Hi. i have a table with all my content inside and im trying to change the background color of the area outside of the table in my css file im using: body { background-color:#000000; } in dreamweaver it displays the area as black but when i upload the css file and try to view the page it shows it as white. i've checked it in IE And firefox.. what am i doing wrong? Hi Guys i wondered if someone can help with a little problem I have, I have got a little contact form with an image submit button. I have included the source code that displays in firefox ie7 and ie 8 but doesnt display in IE6 and I am pulling my hair out. Please help guys Css .button { width:200px; height:80px; margin: 0; padding: 0; border: 0; background:url(images/button.png) no-repeat center top; text-indent: -1000em; cursor: pointer; /* hand-shaped cursor */ cursor: hand; /* for IE 5.x */ HTML <td colspan="2" class="boldenquire2"><input name="send" type="submit" class="button" onclick="return checkForm();" value="" height="80" width="100" /></td> </td> thanks I have a backround coded in the Div I have set up for my navigation...when I call an image in (button image) into the foreground of my Div, the background moves up so only part of it is viewable. This is my html: Code: <div style="position:static;"><img src="images/hdr_regular.jpg" height="29" width="320" border="0" align="left" alt=""/></div> <div style="position:static; background-image:url(images/nav_bg.jpg); background-repeat:repeat-x;"><img src="images/nav_logout_btn_grey.jpg" height="42" width="87" border="0" /></div> This is my css: Code: body, #wrapper { width: auto; min-width: 0px; min-height:100%; font-family:Arial,Helvetica,sans-serif; margin: 0; padding:0; overflow:hidden; } #wrapper_hdr {position:static; width:auto; min-width:0px; min-height:100%; } #wrapper_navigation { position:static; width:auto; min-width:0px; height:42px; background-image:url(../images/nav_bg.jpg); background-repeat:repeat-x; } #wrapper_content { position:static;width:auto; min-width:0px; background-image:url(../images/bg.jpg); background-repeat:repeat-x; padding:8px; padding-bottom:100px; } #wrapper_ftr { width:auto; min-width:0px; white-space:100%; height:80px; background-color: #F4F4F4; padding:2px; bottom:0; left:0; } any help would be greatly appreciated. Thanks! Hi all. I've tried searching the net but every solution either isn't applicable or doesn't work. My problem is that all my CSS background images are not displaying at all in ie7. they are called in via link id. so: PHP Code: <a href="javascript:void(0)" id="cus" onClick="changeCus()"><img src="/images/space.gif" height="30" width="50" alt="" title="Customer Ratings" /></a> fairly simple stuff. the corresponding css is PHP Code: a#cus{background:url("../images/custM.png")no-repeat;left:-140px} I have treid changing the link as in ../../images... but that was dumb. Adding a background position. Adding display:inline. Adding display:block. Can anyone please aligten me as to why all my css images are failing. It works fine in FireFox. My doctype is set to strict. It is the correct path to the images. The images are on the server. Any help would be greatly apprcieated. Thanks in advance Jaza I've got a mostly-css layout he http://highballsociety.com/~lwco/test.php Using the following CSS page he http://highballsociety.com/~lwco/lwc.css For some reason, the div on the right will not display the off-white background color in IE 6. It looks fine in Firebird and even on IE 5 for Mac. I have a feeling that this has something to do with the fact that I've not done very precise sizing of various divs and haven't really implremented the IE box-model hack for much of the site. Let me know if you can help. Also, when I force IE to redraw, by moving the page off the screen and back on, or if I hover over the text in the div, it seems to try redrawing the off-white background, but never actually completes. Thanks, m__ I have edited this page down to be bare-bones for ease... The background image only shows behind the 'branding' div. It used to show all the way down. The problem is somewhere in the style sheet because it looks the same even when I take out all content between the body tags. I am not sure what mistake I made. When you look at the style sheet you will find html#orchid to be commented out. I realized how to work with that to fix the problem, however I want to know what is causing this problem in the first place, for my further education. http://www.centerpointpilates.com/welcome2.html code: Code: <?xml version="1.0" encoding="iso-8859-1"?><!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" lang="en" xml:lang="en"> <head> <title>CENTERPOINT PILATES :: a Santa Barbara pilates studio</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <link href="/centerpoint.css" rel="stylesheet" type="text/css" /> </head> <body background="/images/orchidYellowOverlay2.jpg" style="background-repeat: no-repeat; background-position: top left;"> <div id="branding"> <h1>CenterPoint Pilates - Exercising the Body and Mind</h1> </div> <!--end branding--> <div id="content"> <div id="navigation"> <ul> <li><a href="/welcome.html">WELCOME</a></li> <li><a href="/studio.html">STUDIO</a></li> <li><a href="/getting-started.html">GETTING STARTED</a></li> <li><a href="/classes.html">CLASSES</a></li> <li><a href="/schedule.html">CLASS SCHEDULE</a></li> <li><a href="/workshops.html">WORKSHOPS</a></li> <li><a href="/pricing.html">PRICING</a></li> <li><a href="/instructors.html">TEACHERS</a></li> <li><a href="/contact-us.html">CONTACT US</a></li> </ul> </div> <!--end navigation--> <div id="text"> <h2>Welcome</h2> <p>CenterPoint Pilates was founded in 2001 with the goal of inspiring each individual on a program of exercising the body and mind. Our certified teachers provide exceptional guidance in private, group, and class settings. The studio is equipped with classic and contemporary exercise apparatus and boasts a stunning view of the Santa Ynez Mountains and downtown Santa Barbara.</p> </div> <!--end text--> </div> <!--end content--> </body> </html> style sheet code: Code: /* Normalizes margins, padding */ body, div, dl, dt, dd, ul, ol, li, pre, form, fieldset, input, blockquote, th, td { margin: 0; padding: 0; } /* Normalizes font-size for headers */ h1, h2, h3, h4, h5, h6 { font-size: 100%; } /* Removes Styles from lists */ ol, ul { list-style: none; } /* Normalizes font-style and font-weight to normal */ address, caption, cite, code, dfn, em, strong, th, var { font-style: normal; font-weight: normal; } /* Removes list-style from lists */ table { border-collapse: collapse; border-spacing: 0; } /* Removes border from fieldset and img */ fieldset, img { border: 0; } /* Left-aligns text in caption and th */ caption, th { text-align: left; } /* Removes quotation marks form q */ q:before, q:after { content: ''; } /* normalizes links */ a:link { text-decoration: none; color: #6b9d98; } a:hover { color: red; } a:visited { text-decoration: none; color: #0B6E64; } /*----------------------------------------------------------------*/ html { background-color: #F6EEC2; text-align: center; } body { font-family: Arial, sans-serif, Geneva, sans-serif; color: #6B9D98; width: 770px; margin: 0 auto; margin-left: 10px; text-align: left; position: relative; } bodyBold { font-family: Arial, sans-serif, Geneva, sans-serif; font-weight: 700; color: #6B9D98; width: 770px; margin: 0 auto; margin-left: 10px; text-align: left; position: absolute; } /*html#orchid { background-image: url(/images/orchidYellowOverlay2.jpg); background-repeat: no-repeat; background-position: top left; }*/ #branding { background: url(images/logo.gif) top left no-repeat; text-indent: -9999px; height: 70px; margin: 0 0 30px 0; } div#content { position: relative; width: 100%; } div#navigation { position: absolute; left: 0; width: 13%; padding-top: 1em; } div#navigation li { font-weight: bold; font-size: .9em; border: 1px solid #6B9D98; width: 115px; padding-bottom: 3px; padding-top: 3px; text-align: center; margin: 0 0 20px 0; } div#text { position: absolute; left: 17%; width: 80%; border-left: 1px solid #6B9D98; padding-left: 10px; } div#site_info{ text-align: center; margin-top: 10px; font-family: Arial, sans-serif, Geneva, sans-serif; font-size: .9em; font-style: italic; color: #6B9D98; padding-bottom: 3px; } h2 { font-size: 1.35em; } indentBox { border: 1px solid #6B9D98; width: 115px; padding-bottom: 3px; padding-top: 3px; text-align: left; margin: 0 0 0 0; } My logo is defined as a background image in my .css. It appears in IE when I print/print preview, but in FF it does not. This is the .css code for the logo div: #logo { float: left; margin-left:1px; width: 200px; background:url(../images/mm-logo.jpg) no-repeat; height:50px;} Any ideas or suggestions? I have a div with a background color set, that I want to have slightly transparent. Inside that div, is essentially my entire website. Now if I apply the opacity to the main outer div, all the divs inside inherit that transparency. Any ways to get around this? The outer Div with the transparency is the "content_wrapper" div. It excludes the header and footer. So the only issue is correcting everything wrapped inside the "content_wrapper" and "content" div. I tried setting the "content" div to opacity: 1; but it had no effect whatsoever. http://www.area51entertainment.co/index.php?about The layout I have going is a bit difficult to explain. Here's a diagram.. The area of importance is the header. The content and main head area are centered. The area to the left and right of the header are a <div>. However, as you can see, the background image on the left is different than the one on the right. I'm having difficulty making this work. the images can be stretched horizontally without a problem, but the two sides must meet in the middle beneath the header. I hope this makes sense. What I've got to do, I think, is tell the background image of the underlying <div> to stretch to 100%, and make this image 300px wide or so including both sides of the image and a split. The split would hide behind the header. I can't find a method to stretch the background image, though. Does anybody know of a better way, or a way to achieve this method at all without getting into completely different layouts? Thanks in advance for any assistance/suggestions. So I have a design where the background is a large (1400x1100) image that fades into a vertical gradient at the edges. I've set up the css as follows: body { background: #000 url(gradient.jpg) repeat-x; margin: 0; } Here's where I run into my problem... I've created an empty DIV to hold the large image which will appear on top of the gradient and positioned it absolutely. <div id="bg_image"></div> #bg_image { width: 100%; height: 1100px; background: url(images/bg_image.jpg) no-repeat top center; margin: 0; position:absolute; } This works and the background looks like it should, however because the large image is inside a DIV, any time the browser window is smaller than that div (which will be the case for most users considering the image size) there will be scrollbars. This makes perfect sense of course I just can't come up with an alternative. If there was a way to extend a background image beyond the borders of a DIV that would work but overflow:visible; doesn't seem to work with background images only content. I wish I could set a repeating background AND a static background in the body style, because that is exactly the effect I'm trying to achieve. Any suggestions would be greatly appreciated! Thanks, Josh I have a table with a specified background color (specified in CSS). The content part of the table (a cell) uses information from a downloaded script (wordpress.com) to load information. I want the table background to shine through everything. How can I accomplish this (I suspect it is in the script CSS, but I don't know what). URL The 'home' page is how I want it (basically that background effect). But the other pages come out funny with no background. Could someone solve this, or alternatively reccommend another way. I'm working on a site (here) that has a two column style layout. Everything works fine in almost any browser OTHER than IE... In IE, the main (right) column shifts so that it is below the content length of the left (floated) column. I want them to be side by side... I've been playing with different solutions for several days. Can anyone help? (link to css file). relevant html: Code: <div id="wrapper"> <div id="container"> <div id="content"> <div id="left"> <!-- Left Block Start --> <!-- Left Sidebox Start --> <!-- Left Sidebox End --> <!-- Left Block End --> </div> <div id="main"> <!-- Center Sidebox Start --> <!-- Center Sidebox End --> <!-- BEGIN: Default News-index Article --> <!-- END: Default News-index Article --> </div> </div> </div> <div class="clearing"> </div> </div> relevant css: Code: /* styles to create table-less layout */ #wrapper { padding-top:10px; background-color: white; text-align:center; } #container { width: 770px; height: auto; margin: 0 auto 0 auto; /* sets the left and right margins to auto for everything else */ border-top: 1px solid white; } #content { /*width: 770px; */ text-align:center; } #main { text-align: left; margin-left: 175px; width: 595px; } #left { text-align: left; float: left; width: 160px; } /* utility clearer class */ .clearing { height: 0px; clear: both; } thanks in advance for the help! Hi, I'm trying to write a simple website but I can't get it to run correctly in Internet Explorer. It looks fine in Firefox and Safari, but in IE none of the CSS is used, it looks like a regular html document. I've run the Validations for both files and they pass (aside from the html file throwing errors about the css styles). Here is my code: Code: <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>TITLE</title> <link rel="stylesheet" type="text/css" href="style.css"> <!-- Date: 2009-08-10 --> </head> <body bgcolor="#D5D5D5"> <center> <banner> <img src="toptile.jpg" height="150px" width="100%" alt="topbanner"> </banner> <br> <logo> <img src="bannerlogo.png" alt="logo"></logo> <navbar> <img src="navbar.png" width="100%" height="650px" alt="background"> </navbar> <blackbar><img src="black.png" width="100%" height="20px" alt="blackbox"></blackbar> <br> <middle> <table border="0" width="800px" cellpadding="10" bgcolor="#DBFBFF"> <tr> <td width="50%" valign="top"> <br><br><br><br><br> <center> Coming Soon... </center> </td> </tr> </table> </middle> </center> </body> </html> and the CSS: Code: logo { position:absolute; display:block; margin-left: auto; margin-right: auto; top:10px; width:100%; z-index:3; } banner { position:absolute; top:-10px; left:-10px; right:0px; z-index:2; } middle { position:absolute; display:block; top:100px; margin-left: auto; margin-right: auto; width:100%; z-index:1; } navbar { position:absolute; top:140px; left:0px; right:0px; z-index:-1; } blackbar { position:absolute; top:140px; left:0px; right:0px; z-index:4; } I realize I'm probably not using all the best practices, but it displays fine on everything but IE. Can someone please help me out here. Thanks Hi for some reason some style are getting lost when ie is displaying the page i am developing, if somone could have a look that would be fantastic edited links because question has been answered Thanks everyone hey all, i am working on new site but it is displaying wrong in IE (surprise surprise). i have been playing around to see if i can get it sorted but am not having any luck, if anyone can offer an idea that would be appreciated. here is the CSS Code: <style type="text/css"> html, body {padding: 0; color: #000; background: #eee; font-family: Arial, Veranda, sans-serif; margin: 0 140px 0 140px;} h1 {color: #FFF; background: url('smallpardimg.jpg') center no-repeat #eef; font: bold 200%/1em Arial, Verdana, sans-serif; padding: 3em 1em 0; margin: 0 0 0 0; border-left: 1px solid gray; border-right: 1px solid gray;} #main {font-size: small; color: #AAA; background: #FFF; margin: 0; padding: 2.5% 12.5%; clear: left; border-top: 1px solid gray;} #nav {margin: 0; padding: 0 0 0 0; float: left; background-color:#eef; border-left: 1px solid gray; border-right: 1px solid gray;} #nav li {list-style:none; float: right; font-size: 12px; line-height: 20px; white-space: nowrap;} #nav a {display: block; float: left; padding: 0 10px 0 10px; text-decoration: none; font-weight: normal; border: 1px solid; border-color: #EEF #EEF #EEF #EEF; color: #333; width: .1em;} html>body #nav a {width: auto;} /* fixes IE6 hack */ /* Commented Backslash Hack hides rule from IE5-Mac \*/ #nav a {float: none;} /* End IE5-Mac hack */ #nav a:hover {background-color: #eef; color: #ccc; border-color: #eee #CCC #eee #ccc;} </style> and here is how it is being used in the html Code: <h1></h1> <ul id="nav"> <li><a href="/render/">?</a></li> <li id="current"><a href="/newmed/">contact us</a></li> <li><a href="/photos/">about globalhotel</a></li> <li><a href="/design/">my account</a></li> <li><a href="/webdev/">hotels</a></li> </ul> <div id="main"> <p> Lorem ipsum, dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi. Lorem ipsum, dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi. Lorem ipsum, dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi. </p> </div> and finally here is a link to the page where i am having probs. thanks in advanced RF Developing a page: As this is my first posting I do not know how to write here the URL, system does not allow me Problem is: I am using behavior: border-radius.htc and border-radius to create rounded corners in boxes. The rounded borders display correctly in Firefox, Chrome, Safari...and amazingly display well in IE7&8. Except for one column on the right hand side. The right and bottom border does not display in IE (the 4 round corners do, however!). I can't figure why. Driving me crazy! Another funny one: the border surrounding the chocolate buttons picture <div class="ftproduct_image"> displays well in all browsers except in IE8. Why could something display well in IE7 but not in IE8? This is a new for me. Any ideas welcomed! I guess you can't help without having a look at the page but I do not know how to give the uRL Code: <div id="s_site"> <a href="#site">This site</a> <h2 id="site_h">About This Memorial Site</h2> <p id="site_p" class="tab_cont">This site is brought to you by the Royal Canadian Branch 3 Legion John Bernard Croak Victorian Cross. In honor of those fallen and served in WW2.</p> </div> the h2 and p element are hidden using display:none; when I click on the anchor link i'd like them to apper using display:block; It seems like I may need to use javascript but I'd rther not use javascript at all, except for thos eunfortunate enough to still be using IE. I can't figure it out I've tried amny thing that didnt work. I've been searching for a selector that will let me access these hidden elements but I can't come up with anything. I half accomplished what I was trying but I can't get the changes to stick. Thanks for reading Please help. I have a page with a table just inside the body tag, which i dont want displayed. This is an ad table and i have no control over it because my free host puts it there. I have my own table inside a <div> tag, which I do want displayed. How can i set up my stylesheet to not display the table just inside the body tag but to do display the table inside the div tag? thanks |