SitePoint Sponsor

User Tag List

Results 1 to 7 of 7
  1. #1
    SitePoint Wizard
    Join Date
    May 2002
    Posts
    1,370
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    background gif - prints unwanted 2nd page onward

    The gif displays as wanted, for a header link bar on any 1st page article:

    Code:
    body {
    background-color: #FFFFFF;
    background-image: url(i/navbar.gif);
    background-repeat: no-repeat;
    background-position: left top;
    }<span style="position:relative;
    Using relative links:
    <span style="position:relative;

    But when printing, the image shows by itself on on page 2, page 3, etc
    Even with 'no-repeat'. With dimensions of 935 x 65

    - How to eliminate the appearance of the gif after page 1 ?

  2. #2
    billycundiff{float:left;} silver trophybronze trophy RyanReese's Avatar
    Join Date
    Oct 2008
    Location
    Whiteford, Maryland, United States
    Posts
    13,564
    Mentioned
    6 Post(s)
    Tagged
    0 Thread(s)
    Don't set it on the body . Set it on a wrapping element.

    Untested though since I don't have a printer
    Twitter-@Ryan_Reese09
    http://www.ryanreese.us -Always looking for web design/development work

  3. #3
    SitePoint Wizard
    Join Date
    May 2002
    Posts
    1,370
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Are you referring to something like?

    Code:
    background:url("i/navbar.gif) no-repeat;
    Any examples you might point to, as I can't seem to find any?

    State it within the span that the links appear on?

  4. #4
    SitePoint Wizard
    Join Date
    May 2002
    Posts
    1,370
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    By setting the css/background gif in the table tag, this went away ONLY FOR FF. Not IE

    Code:
    .nbar {background-image: url(i/navbar.gif); background-repeat: no-repeat; background-position: left top; line-height:145%; color:#000000; text-decoration: none; font-size: 13px; font-weight: 400; font-family: Arial, Helvetica, sans-serif;}

  5. #5
    billycundiff{float:left;} silver trophybronze trophy RyanReese's Avatar
    Join Date
    Oct 2008
    Location
    Whiteford, Maryland, United States
    Posts
    13,564
    Mentioned
    6 Post(s)
    Tagged
    0 Thread(s)
    Wrapping element, table that contains everything. Tomatoe Tomatoe

    We need to be able to see a link or at least full code so we can reproduce this at our end so some of us can debug it
    Twitter-@Ryan_Reese09
    http://www.ryanreese.us -Always looking for web design/development work

  6. #6
    SitePoint Wizard
    Join Date
    May 2002
    Posts
    1,370
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    RyanReese , thanks for the help. That last snippet I posted simply was without the "background-attachment: scroll;"

    And applied to the table and not the body, it works for Firefox and IE.

    Guess I was looking for a more complicated answer.

  7. #7
    billycundiff{float:left;} silver trophybronze trophy RyanReese's Avatar
    Join Date
    Oct 2008
    Location
    Whiteford, Maryland, United States
    Posts
    13,564
    Mentioned
    6 Post(s)
    Tagged
    0 Thread(s)
    background-attachment:scroll is a default property.

    If you mean IE6 wasn't working, then yes you are correct because background-attachment:fixed (the other value for it) doesn't work in IE6 except on the <body> element.

    Glad you fixed it though
    Twitter-@Ryan_Reese09
    http://www.ryanreese.us -Always looking for web design/development work


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
  •