SitePoint Sponsor

User Tag List

Results 1 to 8 of 8
  1. #1
    BoOm-Rocka! Smarky's Avatar
    Join Date
    Jun 2000
    Location
    England
    Posts
    1,319
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Angry Problem with CSS in Firebird

    Hey,

    I'm just starting to explore CSS much more and as such have used it in a few different ways in this uncompleted amaterish design i am doing for someone.

    Anyway it relates to CSS being used to show a background image on a div tag, with text that will appear on top of it. It works fine in IE and displays correctly in Dreamweaver's WYSIWYG mode, however the image is missing in Firebird. When you click view background image it displays however.

    The problem is with the style called "purple_dot" which is shown below.

    Code:
    .purple_dot {
    	background-image: url(images/purple_dot_blur.jpg);
    	background-repeat: no-repeat;
    	padding-left: 50px;
    	background-attachment: fixed;
    }
    It validates using the W3C checker. it just doesn't display.

    An example is here: http://www.smarky.com/sessions/web_design/christine_lyle/

    The "headlines" should be styled with the background image, but are not in Firebird.

    Help!
    Garlic bread, I've tasted it, it's the future

  2. #2
    SitePoint Enthusiast
    Join Date
    Jun 2003
    Location
    behind my computer
    Posts
    44
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    change
    Code:
    background-image: url(images/purple_dot_blur.jpg);
    to
    Code:
    background-image: url("images/purple_dot_blur.jpg");
    (add in quotes)

  3. #3
    BoOm-Rocka! Smarky's Avatar
    Join Date
    Jun 2000
    Location
    England
    Posts
    1,319
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Klevin
    change
    Code:
    background-image: url(images/purple_dot_blur.jpg);
    to
    Code:
    background-image: url("images/purple_dot_blur.jpg");
    (add in quotes)

    Thanks for the tip, but this doesn't make any difference.
    Garlic bread, I've tasted it, it's the future

  4. #4
    SitePoint Enthusiast
    Join Date
    Jun 2003
    Location
    behind my computer
    Posts
    44
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    whoops. thought it was required. ill investigate a little more into it and get back to you in a few minutes

  5. #5
    SitePoint Guru bronze trophy blufive's Avatar
    Join Date
    Mar 2002
    Location
    Manchester, UK
    Posts
    853
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Lose the "background-attachment: fixed;"

    As far as I can tell, it's completely unnecessary in IE6, and is breaking Mozilla and Opera 7+.

    As for what's going on - you're falling foul of an IE bug described in Eric Meyer's "complex spiral" demo page:
    According to CSS, any background image that is "fixed" using background-attachment: fixed; is fixed with respect to the viewport [i.e. the browser window] -- not the element with which the image is associated.[...]However, the image will only be visible wherever is intersects with the element to which it's been assigned.
    Unfortunately, IE/Windows can't handle this, and it displays the background image aligned with the assigned element. This is contrary to the CSS1 spec.

    The background image IS being picked up by mozilla, it's just positioned at the top left corner, where it's hidden by the rest of the page.

    [blimey, the page is working - that was quick editing! ]

  6. #6
    BoOm-Rocka! Smarky's Avatar
    Join Date
    Jun 2000
    Location
    England
    Posts
    1,319
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Oh it works! Thank you very much

    Sorry if it was one of those stupid questions, I have no clue about using CSS apart from for basic fonts really.

    Sadly I have been out of the loop of learning new things recently and this one has passed me by. I'm working on it though! I'm gonna be around Sitepoint prob allot more too. So expect to see me in your way in the next few months!
    Garlic bread, I've tasted it, it's the future

  7. #7
    SitePoint Guru bronze trophy blufive's Avatar
    Join Date
    Mar 2002
    Location
    Manchester, UK
    Posts
    853
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    That one's pretty subtle, so not a stupid question by any stretch. Glad to help.

  8. #8
    BoOm-Rocka! Smarky's Avatar
    Join Date
    Jun 2000
    Location
    England
    Posts
    1,319
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by blufive
    That one's pretty subtle, so not a stupid question by any stretch. Glad to help.
    Thanks again, and yea on the quick editing note I'm working on the rest of the site now. It's for a course i'm doing. This is just a quick and dirty example of "Personal publishing". The lessons on CSS for layout are coming up so i'm looking forward to them! and once I have gone through this course and have time I will get the Sitepoint book.
    Garlic bread, I've tasted it, it's the future


Bookmarks

Posting Permissions

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