SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Hybrid View

  1. #1
    SitePoint Member
    Join Date
    Apr 2011
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Center background image in DIV

    I'm a newbie here... Please help me center the background image in this div! I've gotten everything else to center except the image coming from the url listed below. Thanks!

    <div align="center">
    <div style='width: 300px; height: 420px; background-image: url( http://vortex.accuweather.com/adcbin...240x420_bg.jpg ); background-repeat: no-repeat; background-color: #D6E2EE;' ><div id='NetweatherContainer' style='height: 405px; 'text-align: center; margin: 0, auto;' ><script src='http://netweather.accuweather.com/adcbin/netweather_v2/netweatherV2ex.asp?partner=netweather&tStyle=whteYell&logo=1&zipcode=74101&lang=eng&size=12&theme=blue&metric=0&target=_self'>
    </script></div><div style='font-family: arial, helvetica, verdana, sans-serif; font-size: 10px; line-height: 15px; color: #FFFFFF;' ><a style='font-size: 10px; color: #FFFFFF' href='http://www.accuweather.com/us/OK/TULSA/74101/city-weather-forecast.asp?partner=accuweather&traveler=0' >Weather Forecast</a>*|*<a style='color: #FFFFFF' href='http://www.accuweather.com/maps-satellite.asp' >Weather Maps</a>*|*<a style='color: #FFFFFF' href='http://www.accuweather.com/index-radar.asp?partner=accuweather&traveler=0&zipcode=74101' >Weather Radar</a></div></div>
    </div>
    </div>

  2. #2
    SitePoint Addict Kokos's Avatar
    Join Date
    Nov 2005
    Location
    The Netherlands
    Posts
    205
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    This is achieved through background-position

    background-position: center center;

    Taking over the web one pixel at a time.
    Currently working @ CodeCreators

  3. #3
    SitePoint Member
    Join Date
    Apr 2011
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Kokos, Big Hug to you! Worked perfectly! Thanks! Tami


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
  •