SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    Gone!
    Join Date
    Aug 2001
    Location
    Witty Location Parody
    Posts
    3,889
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Just horizontal alignment?

    Hey guys,

    I have using this code within my table table tage in order to centre both horizontally and vertically, a table background image. And, it does it job perfectly, couldn't be happier with it.

    What I need to do now is modify it so that it centres itself horizontally but stays at the top vertically.

    I Have tried changing it as it seems simple enough, but as always, no joy!

    Anyone help?

    Code:
    <table width="100%" align="center" cellspacing="0" cellpadding="0" style="background-image: URL(images/bglogo.gif); background-postion: 50% 50%; background-repeat: no-repeat; background-position: 50% 50%; background-attachment: fixed">
    Cheersies, Glen

    Another quicky: If you have a HTML page with an IFRAME slap bang in the middle with links inside, how do you target the links so that the page loads in the entire browser no just inside the IFRAME?

  2. #2
    SitePoint Wizard
    Join Date
    Jul 2001
    Location
    The Netherlands
    Posts
    2,617
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    This might be pointing into the obvious (and wrong) direction, but you are using background-position twice. I assume background-position: 50% 0% should do the trick, but if you only change the first one, it will be overwritten by the second one. Thus the background position stays at 50% 50%.

  3. #3
    Gone!
    Join Date
    Aug 2001
    Location
    Witty Location Parody
    Posts
    3,889
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thats exactly what I thought, but taking out the second one moves the image to the left what ever values you put in the first one.

    Its very confusing. I have tried numerous combinations!


  4. #4
    Gone!
    Join Date
    Aug 2001
    Location
    Witty Location Parody
    Posts
    3,889
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    OK, well I tried again and it seems to work using 50% 0% in both fields, but doesnt work using the background-postion: 50% 0% just once.

    Thanks Mark

    Does anybody have any ideas about the second question I asked in the first post, the one right at the bottom?

    Cheers

  5. #5
    SitePoint Wizard creole's Avatar
    Join Date
    Oct 2000
    Location
    Nashvegas Baby!
    Posts
    7,845
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    target="_parent" will load the target page over the top of any frames. That will in effect, replace the iframe with the target page. Is that what you want?
    Adobe Certified Coldfusion MX 7 Developer
    Adobe Certified Advanced Coldfusion MX Developer
    My Blog (new) | My Family | My Freelance | My Recipes

  6. #6
    Gone!
    Join Date
    Aug 2001
    Location
    Witty Location Parody
    Posts
    3,889
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    That sounds exactly what I want, Ill try it tomoro when Im at work! Should have tried that really but I havent had much experience with IFRAMES.

    Thanks a million Creole, this is the last nail in the coffin for this paticular site!

    Glen

    Edit:


    Now I feel really dumb, its just like a normal link and has nothing to do with IFRAMES!!! Doh, doh, doh!


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
  •