Home > Background Image > Backgroundimage Not Working

Backgroundimage Not Working


Here is my code, where did I go wrong? .main-banner { background-image: url("../img/collection-of-classic-cars.jpg") no-repeat; }


Lorem ipsum dolor sit amet, consectetur adipiscing elit.

The internet is fundamentally a massive network. This: background-image" url("images/pic.jpg") no-repeat; Should actually be this: background: url("images/pic.jpg") no-repeat; EDIT: As @karlpcrowley already said. ylc66 # May 10, 2012 at 1:17 pm you're welcome !

Is there a way to block an elected President from entering office? Notable Tools to rapidly prototype and iterate. But then if I knew what the problem was I would have fixed it?! Currently, your css file is looking for the "img" folder in its css directory like this: yourfile.htmlcss/cssfile.css /* path to image: img/slogan.png */css/img/slogan.png Absolute vs Relative paths: /img/slogan.png is an absolute

Css Body Background Image Not Working

share|improve this answer edited Feb 1 '11 at 6:23 answered Feb 1 '11 at 6:17 Harry Joy 36.7k17118177 add a comment| up vote 0 down vote You have applied class "btn-pTool" Which security measures make sense for a static web site? Please check your inbox or your spam filter for an email from us. Notable Prototype, iterate and collect feedback on your products.

Using the shorthand "background" instead, you can specify the repeat property as well as position and background color all in one line ylc66 # March 15, 2012 at 7:58 am maybe html css background-image share|improve this question edited Apr 9 '12 at 18:18 BoltClock♦ 388k979391052 asked Feb 1 '11 at 5:48 Twidizle 84148 1 are style.css and slide_button.png are in the I specify my background inside of body in my css style sheet, but the page just displays a blank white background. Css Background Image Not Loading Also, if you would write a PHP you would appreciate what it can do i.e.

My html was as below: I added " " as @shankhan suggested inside th and the image started showing up.   share|improve this answer answered Jan Bingo! just not sure why the pictures not showing, the alternative background colour shows Thanks Sanjay PRO J.T. share|improve this answer answered Jun 24 '14 at 9:42 user3750236 13 add a comment| up vote -1 down vote Use this one to add background--- background-image: url('images-path'); You can also add

ronpat 2012-12-21 05:33:10 UTC #4 The question asked is: Where is the "img" folder??? Css Background Image Not Showing Up Try to put some text there see if that does something. 0 width and height will never show the picture. –Randy May 28 at 23:15 The css is in If you think of an image as a background asset, then you should store it with your stylesheets if it makes sense to you. kgscott284 # March 15, 2012 at 1:34 am This reply has been reported for inappropriate content.

Background Image Not Working In Chrome

CSS background-image?208CSS Display an Image Resized and Cropped1632How do I give text or an image a transparent background using CSS?432Is embedding background image data into CSS as Base64 good or bad http://foundation.zurb.com/forum/posts/1784-background-images-not-working Like for any CSS dimension, there is no space between the unit literal and the number.">

http://cdpn.io/EmfoK you might try a "../" before img. Replace the text within the single quotes with your image name. University Ideas, thoughts and design resources shared with you. Gralka J.T. Css Background Color Not Working

system 2011-12-03 23:40:31 UTC #5 DoubleDee said: That won't work with PHP the way it does in HTML, ok, if you say so. Flash forward to today and they have a successful store front, catering business and cupcake truck.

Read More

Get Bakin’ with Us

My best guess is your image path is wrong, as i'm assuming your css is in the "stylesheets" folder, but that you wouldn't have your 'img' folder in there. Weird.

Sign up now Thanks! Background-image Invalid Property Value OP chance the .btn-pTool class to be display: inline-block to make it work like a span/div hybrid (take the background, but not cause a break in the layout). background-image:url("img/background.png"); Like so?

Gralka J.T.

components body_header.inc.php css components.css images debbie_160x45.png pages article_index.php howto_index.php interview_index.php index.php In every web page in my site I have this code to include my Page Header... Gralka J.T. more stack exchange communities company blog Stack Exchange Inbox Reputation and Badges sign up log in tour help Tour Start here for a quick overview of the site Help Center Detailed Css Background Image Url Path And is the HTML In the root folder? –Randy May 28 at 23:11 Does the image load if you put it in the HTML as img tag? –Randy May

Email Address CSS-Tricks* is created, written by, and maintained by Chris Coyier and a team of swell people. Try adding a non breaking space to give the link and span some contents:   It's also worth noting that the CSS spec says that you Either you need to give full path. There are two kinds of images in CSS: plain static images, often referenced using a URL, and dynamically-generated images like gradients or representations of parts of the tree.">

What is the point of update independent rendering in a game loop? Percentages are formed by a immediately followed by the percentage sign %. Can't figure this out. Benjamin, while I understand your concern about the way some instruction is delivered here on Treehouse, I encourage you to be patient when it comes to understanding how to work through

Join them; it only takes a minute: Sign up CSS Background image not loading up vote 3 down vote favorite I have followed all of the tutorials, which all say the Color changes DO work though so I know I'm doing something right.

7 Replies Follow Background Images Not Working by Brian Martin Friday, January 24, 2014 at 3:39 PM EST Background CSS background-image?208CSS Display an Image Resized and Cropped1632How do I give text or an image a transparent background using CSS?432Is embedding background image data into CSS as Base64 good or bad successfulfail 2012-12-21 04:19:43 UTC #3 No slogan.png image file is at "img" folder.

The backwards directory worked! :) Nathan Edwards 9,310 Points Nathan Edwards Nathan Edwards 9,310 Points 6 months ago Also one thing I have noticed when saving images from photoshop, sometimes you Many CSS properties can take percentage values, often to define sizes in terms of parent objects. Just as is the case with all other units in CSS, there isn't a space between the '%' and the number.">

style.css: .btn-pTool{ margin:0; padding:0; background-image: url(slide_button.png); background-repeat:no-repeat; } .btn-pToolName{ text-align: center; width: 26px; height: 190px; display: block; color: #fff; thanks so much PRO Benjamin Taub Pro Student 437 Points Benjamin Taub Benjamin Taub Pro Student 437 Points over 3 years ago Folks, I ran into a similar problem and there I don't know if you intentionally renamed it to bg-text.jpg or if it's a typo on your end.

Like I said, I find relative paths a lot less problematic - but that's just me ralphm 2011-12-04 02:24:45 UTC #12 webdev1958 said: tbh, I find absolute paths can be a polyhedra 2012-12-21 16:34:10 UTC #11 It is importent to write CSS corectly.1) Write the CSS like this background: url(/img/slogan.png) 75px 50% no-repeat; Here is how to use the background propertie 2) Hotels on the Las Vegas strip: is there a commitment to gamble? share|improve this answer answered May 28 at 23:17 TeaCode 72126 he failed property, not path –vicodin May 28 at 23:18 add a comment| up vote 1 down vote You