How to: Use a background image in table cells

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sifuhall
    Senior Member
    • May 2001
    • 254

    How to: Use a background image in table cells

    If I wanted to modify my templates to use a background image in the td instead of a color, how many templates would I need to modify?

    A lot?
  • Mike Sullivan
    Former vBulletin Developer
    • Apr 2000
    • 13327
    • 3.6.x

    #2
    Which color option do you want to change? (I mean the replacement variable one) Paste it here, but put an extra space so it isn't parsed (like this: { pagebgcolor})

    Comment

    • Kier
      Former Lead Developer, vBulletin
      • Sep 2000
      • 8179

      #3
      Actually, you don't need to edit any templates at all.

      Suppose you want to make {firstaltcolor} be light blue with an image background - normally you would enter this as your entry for {firstaltcolor}: #6666FF

      Therefore, this:
      Code:
      <td bgcolor="[color=red]{[color=red]firstaltcolor[/color]}[/color]">
      would be replaced by
      Code:
      <td bgcolor="[COLOR=red]#6666FF[/COLOR]">
      However, if you want an image, you can trick the system like this:

      #6666FF" background="myimages/myimage.gif

      Note the careful arrangement of quotes.

      Therefore, this:
      Code:
      <td bgcolor="[color=red]{[color=red]firstaltcolor[/color]}[/color]">
      would be replaced by
      Code:
      <td bgcolor="[COLOR=red]#6666FF" background="myimages/myimage.gif[/COLOR]">
      Last edited by Kier; Thu 26 Jul '01, 4:21pm.

      Comment

      • sifuhall
        Senior Member
        • May 2001
        • 254

        #4
        Thanks, Kier!

        Works great!

        If you want to see this in action click here

        Comment

        • jeff_c
          New Member
          • Jul 2001
          • 3

          #5
          pretty freakin cool!!!

          Comment

          • Jake Bunce
            Senior Member
            • Dec 2000
            • 46598
            • 3.6.x

            #6
            that's a neat trick

            Comment

            • Schoolhouse Roc
              New Member
              • Aug 2001
              • 22

              #7
              Hey Sifuhall!

              Your board looks great! Is the image you are using a gradient image? Or is it a combo of a background color and a gif image with a transparent background? Plus, how is it that it changes sizes when going from the homepage to an actual thread?

              Thanks!

              Comment

              • Smoothie
                Senior Member
                • Oct 2001
                • 250

                #8
                re:background image in the td

                Where would I find this code to edit? I'm assuming it's in the control panel somewhere.

                Comment

                • Chen
                  Senior Member
                  • Jun 2001
                  • 8388

                  #9
                  In Admin CP => Styles => Modify => Colors/Fonts/etc.
                  Chen Avinadav
                  Better to remain silent and be thought a fool than to speak out and remove all doubt.

                  גם אני מאוכזב מסיקור תחרות לתור מוטור של NRG הרשת ע"י מעריב

                  Comment

                  • Smoothie
                    Senior Member
                    • Oct 2001
                    • 250

                    #10
                    just a tad more help

                    Originally posted by FireFly
                    In Admin CP => Styles => Modify => Colors/Fonts/etc.
                    Thanks for the reply. I'm in the Admin CP, Styles, Mod, Colors/Fonts. Where exactly do I add this. Am I replacing code, or adding?

                    Comment

                    • Robouk
                      Senior Member
                      • Aug 2001
                      • 100

                      #11
                      nice tip, thanks

                      Comment

                      • Ikram
                        Member
                        • Dec 2001
                        • 39

                        #12
                        Re: just a tad more help

                        Originally posted by Smoothie

                        Thanks for the reply. I'm in the Admin CP, Styles, Mod, Colors/Fonts. Where exactly do I add this. Am I replacing code, or adding?
                        I want to know this too, Where do I put the beneath code in the colours/fonts part of my style??

                        <td bgcolor="#6666FF" background="myimages/myimage.gif">

                        pls reply!

                        Thanks


                        Post Edit - All sorted now, sorry Im just new to all of this,

                        #6666FF" background="images/bgimage.gif <------- This goes in the Catbg color field!
                        Last edited by Ikram; Mon 10 Dec '01, 11:02pm.

                        Comment

                        • Kengan
                          Senior Member
                          • Jul 2001
                          • 103

                          #13
                          Nice man !

                          Comment

                          widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
                          Working...