SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Addict
    Join Date
    Dec 2004
    Location
    kansas
    Posts
    206
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    .swf movie not lining up

    At http://rmv17.topcities.com/ I need the top movie to fill the entire area. Right now it is only centered and when I make it bigger it moves right.
    Thanks for the help
    Attached Files Attached Files

  2. #2
    The CSS Clinic is open silver trophybronze trophy
    Paul O'B's Avatar
    Join Date
    Jan 2003
    Location
    Hampshire UK
    Posts
    40,556
    Mentioned
    183 Post(s)
    Tagged
    6 Thread(s)
    Hi,

    I'm not quite sure what you are trying to do as the header seems to be in the right place already.

    To centre an element you need to use margin-right:auto and margin-left:auto on an element with specied width. (ie5 and 5.5. need text-align centre on a parent - see faq on centering for more info.)

    e.g.
    Code:
    #header { width:733px;margin-left:auto;margin-right:auto; height: 185px; position: relative; background: #ffffff url(http://rmv17.topcities.com/header.gif) no-repeat center center }
    You had a position:relative with a left value in the above which will put the centering out by the amount you specified. Position:relative moves an element in relation to itself but the space it previously occupied is preserved. This means everything else thinks its still where it was.

    Position:relative is usually used for effect rather than for positioning layouts. However if you wanted an offset where nothing else changes then position;relative is ideal.

    Paul

  3. #3
    SitePoint Addict
    Join Date
    Dec 2004
    Location
    kansas
    Posts
    206
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for the help! I am new to CSS design. Since I have changed that header, everything has been falling into place.


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
  •