Professional Web Applications Themes

center the background image - Adobe Dreamweaver & Contribute

takashi0808 webforumsuser wrote: >how can I center the background image? >I know how to "fix" the background image like this >body background="./image/corner.gif" bgproperties="fixed" >now I want to know how to "CENTER" it! Try it with CSS: body {background: #rgb url(/path/to/image) center;} Replace the 'rgb' with a background color. 4.3.6 Colors [url]http://www.w3.org/TR/REC-CSS2/syndata.html#value-def-color[/url] 14.2.1 Background properties: 'background-position' [url]http://www.w3.org/TR/REC-CSS2/colors.html#propdef-background-position[/url] Micha...

  1. #1

    Default Re: center the background image

    takashi0808 webforumsuser wrote:
    >how can I center the background image?
    >I know how to "fix" the background image like this
    >body background="./image/corner.gif" bgproperties="fixed"
    >now I want to know how to "CENTER" it!
    Try it with CSS:

    body {background: #rgb url(/path/to/image) center;}

    Replace the 'rgb' with a background color.

    4.3.6 Colors
    [url]http://www.w3.org/TR/REC-CSS2/syndata.html#value-def-color[/url]

    14.2.1 Background properties: 'background-position'
    [url]http://www.w3.org/TR/REC-CSS2/colors.html#propdef-background-position[/url]

    Micha
    Michael Fesser Guest

  2. #2

    Default Re: center the background image

    "takashi0808" <webforumsusermacromedia.com> wrote in message
    news:bf9470$dpm$1forums.macromedia.com...
    > how can I center the background image?
    > I know how to "fix" the background image like this
    > body background="./image/corner.gif" bgproperties="fixed"
    > now I want to know how to "CENTER" it!

    The bgproperties="fixed" is an IE only proprietary extension to html. In
    other words, it only works in IE. A better solution is to set your
    background image via CSS. Click Text->CSS Styles->Create New CSS Style. In
    the dialog, click the Redefine HTML tag radio button and select "body" from
    the list. In the next dialog, set your background image, choose fixed and
    center for both horizontal and vertical position. Note that NN4 does not
    respect background image positioning and will always place it in the upper
    left corner.

    Gary


    Gary White Guest

  3. #3

    Default Re: center the background image

    Thanks for your help
    It looks like I need to study CSS

    Thanks
    Takashi



    takashi0808 webforumsuser@macromedia.com Guest

  4. #4

    Default Re: center the background image

    "takashi0808" <webforumsusermacromedia.com> wrote in message
    news:bfbnh5$t3o$1forums.macromedia.com...
    > Thanks for your help
    > It looks like I need to study CSS
    You're welcome.

    Gary


    Gary White Guest

Similar Threads

  1. Background Image with Alpha + background color?
    By trytertqwr in forum HTML & CSS
    Replies: 3
    Last Post: February 17th, 11:14 AM
  2. How to center image in canvas
    By Frederic Laruelle in forum Macromedia Flex General Discussion
    Replies: 2
    Last Post: May 1st, 06:36 PM
  3. Center background image
    By Studio52 in forum Macromedia Dynamic HTML
    Replies: 5
    Last Post: July 4th, 11:24 AM
  4. Center image using position: absolute?
    By Dafydd ab Hugh in forum Macromedia Dynamic HTML
    Replies: 2
    Last Post: August 25th, 09:19 PM
  5. Can't center image on HP 1115
    By larrysimon in forum Adobe Photoshop Elements
    Replies: 8
    Last Post: September 4th, 01:40 PM

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
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139