www.webdeveloper.com
Results 1 to 5 of 5

Thread: [RESOLVED] Background images and padding not working...

  1. #1
    Join Date
    Jun 2003
    Posts
    72

    resolved [RESOLVED] Background images and padding not working...

    Having problems with my stylesheet.

    If you take a look at this screenshot, you'll see how the PREVIEW looks in dreamweaver (it also shows the html code).
    http://www.djgallagher.com/fit.png

    However, when the page is posted to my server, and I view the page, the background green box disappears!
    http://www.djgallagher.com/fit4funds/test.php

    The style sheet is obviously working (since the page's background image is appearing). So, I know that is linked up correctly...

    And the image paths are correct (especially since the images appear on the server)...
    http://www.djgallagher.com/fit4funds...280gre_top.png

    So what is going on? I chopped my script and page down to simplify the page and still can't see what is going wrong!!! Please help!!!

  2. #2
    Join Date
    Jul 2007
    Location
    Wisconsin
    Posts
    468
    looking at the test.php, I don't even see "box280gre_top.png" referenced in the css file, not to mention any '3box1', '3box' or '3boxbot' classes.

    Try adding the 'greenbox' class to the div with the 3box class:

    HTML Code:
    <div class="3box greenbox"> content </div>

  3. #3
    Join Date
    Jun 2003
    Posts
    72
    Um, it's in the linked style sheet....


    Code:
    .3boxes			{ display:block; margin: 10px 0; width:860px; }
    .3box1, .3box2, .3box3 { float:left; width:280px; }
    .3box1, .3box2	{ margin-right:10px; }	
    .3box			{ background-image:url(i/box280gre_top.png); padding:10px; width:260px; line-height:22px; }
    .3boxbot		{ background-image:url(i/box280gre_bot.png); width:280; height:8px;}
    .3boxphoto		{ clear:both; position:relative; }

  4. #4
    Join Date
    Jul 2007
    Location
    Wisconsin
    Posts
    468
    Not sure why I didn't catch this earlier, but CSS class names can not start with numbers. This is why Firebug was not reading them (and my "they're not there" comment).

  5. #5
    Join Date
    Jun 2003
    Posts
    72
    That is SOOOOO frustrating. I've been pulling my hair out trying to figure out what is wrong ... and that was it. Thanks alot!!!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles