Center background image

Ask a Question related to Macromedia Dynamic HTML, Design and Development.

  1. #1

    Default Center background image

    As you may understand, I have a web site.
    One of the things I want to do on this sit is center the background image on
    the top,
    but what ever I try to do it just tiles to the left top.
    Can you help me?

    Studio52 Guest

  2. Similar Questions and Discussions

    1. How to center image in canvas
      Having trouble with centering variable size images inside a canvas. As i understand it, centering can be done with by setting .x and .y...
    2. Aligning image to the center of the page
      Hi, I'm quite a newbie to designing webpage. I know how to align an image, or picture to the center adjustment horizontally, but unable to do it...
    3. Center image using position: absolute?
      I have an image (it's a navigation bar) that should appear with a specifc vertical position; so I'm using absolute positioning to put it a precise...
    4. Can't center image on HP 1115
      I'm trying to print an 8X10 image on 8.5X11 paper landscape. The center image box on the print preview page is checked and Elements generates an...
    5. center the background image
      takashi0808 webforumsuser wrote: Try it with CSS: body {background: #rgb url(/path/to/image) center;} Replace the 'rgb' with a background...
  3. #2

    Default Re: Center background image

    Use CSS - background-position:center top;

    --
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    [url]http://www.dreamweavermx-templates.com[/url] - Template Triage!
    [url]http://www.projectseven.com/go[/url] - DW FAQs, Tutorials & Resources
    [url]http://www.dwfaq.com[/url] - DW FAQs, Tutorials & Resources
    [url]http://www.macromedia.com/support/search/[/url] - Macromedia (MM) Technotes
    ==================


    "Studio52" <webforumsuser@macromedia.com> wrote in message
    news:e803qq$nsf$1@forums.macromedia.com...
    > As you may understand, I have a web site.
    > One of the things I want to do on this sit is center the background image
    > on
    > the top,
    > but what ever I try to do it just tiles to the left top.
    > Can you help me?
    >

    Murray *ACE* Guest

  4. #3

    Default Re: Center background image

    So you can't do it in html?
    Studio52 Guest

  5. #4

    Default Re: Center background image

    No, not as a page background image. It's very easy in CSS.

    Change this -

    </head>

    to this -

    <style type="text/css">
    <!--
    body { background-image:url(whatever.jpg); background-position:center top; }
    -->
    </style>
    </head>

    on each page, and you have it.

    Alternatively, you could put this into a plain text file -

    body { background-image:url(whatever.jpg); background-position:center top; }

    (make sure your pathing is correct)

    and save it as "whatever.css", and then you would make each page like this -

    <link rel="stylesheet" type="text/css" media="screen" href="whatever.css">

    Either way works, but the latter is more flexible since a single change to
    that file will now reflect in every page that uses it.



    --
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    [url]http://www.dreamweavermx-templates.com[/url] - Template Triage!
    [url]http://www.projectseven.com/go[/url] - DW FAQs, Tutorials & Resources
    [url]http://www.dwfaq.com[/url] - DW FAQs, Tutorials & Resources
    [url]http://www.macromedia.com/support/search/[/url] - Macromedia (MM) Technotes
    ==================


    "Studio52" <webforumsuser@macromedia.com> wrote in message
    news:e82k3j$ssb$1@forums.macromedia.com...
    > So you can't do it in html?

    Murray *ACE* Guest

  6. #5

    Default Re: Center background image

    It worked,
    thank you very mutch!
    Studio52 Guest

  7. #6

    Default Re: Center background image

    You're welcome. Learning CSS is the very best way to drive your skills to
    the next level.

    --
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    [url]http://www.dreamweavermx-templates.com[/url] - Template Triage!
    [url]http://www.projectseven.com/go[/url] - DW FAQs, Tutorials & Resources
    [url]http://www.dwfaq.com[/url] - DW FAQs, Tutorials & Resources
    [url]http://www.macromedia.com/support/search/[/url] - Macromedia (MM) Technotes
    ==================


    "Studio52" <webforumsuser@macromedia.com> wrote in message
    news:e8dcu2$55s$1@forums.macromedia.com...
    > It worked,
    > thank you very mutch!

    Murray *ACE* Guest

Posting Permissions

  • You may not post new threads
  • You may 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