1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

A .gif instead of a RGB

Discussion in 'HTML & JavaScript' started by M1ndfluX, Sep 18, 2011.

  1. M1ndfluX

    M1ndfluX Senior Member

    Joined:
    Dec 23, 2009
    Messages:
    1,119
    Likes Received:
    868
    Location:
    031010
    Hey guys,


    Although i am not a total loss in html and php i just cant figure out on how to replace a rgb colour for a .gif in a piece of a optin code :rolleyes:

    This is the original:

    Code:
      <div
    style="border: 1px solid rgb(0, 0, 0); padding: 10px; background: rgb(221, 221, 221) none repeat scroll 0%; font-family: verdana; font-size: 11px; width: 160px; -moz-background-clip: initial; -moz-background-origin: initial; -moz-background-inline-policy: initial;">
      <strong><span style="color: rgb(51, 51, 51);">blah blah</span></strong>
    And instead of the 221 colour i want a .gif background...

    Any help would be appreciated :D

    TY
     
  2. WPRipper

    WPRipper Supreme Member

    Joined:
    Mar 24, 2010
    Messages:
    1,378
    Likes Received:
    1,493
    Location:
    Proudly romanian
    Try

    background: url(images.gif)
     
    • Thanks Thanks x 1
  3. M1ndfluX

    M1ndfluX Senior Member

    Joined:
    Dec 23, 2009
    Messages:
    1,119
    Likes Received:
    868
    Location:
    031010
    Hi RedDeezer!


    Thanks a bunch dude, worked perfectly :D

    Never to old to learn lol. Rep Given.


    TY
     
  4. WPRipper

    WPRipper Supreme Member

    Joined:
    Mar 24, 2010
    Messages:
    1,378
    Likes Received:
    1,493
    Location:
    Proudly romanian
    ;) Cheers
     
  5. hellrazor

    hellrazor Newbie

    Joined:
    Mar 13, 2010
    Messages:
    25
    Likes Received:
    11
    Make sure if the background might repeat you also control the background repeat with

    background-repeat {none;} for dont repeat
    background-repeat {repeat-x;} for repeating horizontally
    background-repeat {repeat-y;} for repeating vertically
     
    • Thanks Thanks x 1
  6. M1ndfluX

    M1ndfluX Senior Member

    Joined:
    Dec 23, 2009
    Messages:
    1,119
    Likes Received:
    868
    Location:
    031010
    Thanks for the addition Hellrazor! Appreciated :)
     
  7. GreyWolf

    GreyWolf Executive VIP Jr. VIP

    Joined:
    Aug 17, 2009
    Messages:
    1,930
    Likes Received:
    5,389
    Gender:
    Male
    Occupation:
    Artist / Craftsman
    Location:
    sitting at my PC
    If you want the background image to remain fixed while the rest of the page scrolls you can also add this code along with what RedDeezer and hellrazor already mentioned:

    background-attachment:fixed

    example:
    Code:
    body
    {
    background-image:url('coolbackground.gif');
    background-repeat:no-repeat;
    background-attachment:fixed;
    background-position:center;
    }
     
    Last edited: Oct 6, 2011