Image on the right

Discussion in 'Web Design and Development' started by Muskie, Feb 4, 2007.

  1. Muskie macrumors 6502

    Muskie

    Joined:
    Dec 1, 2003
    Location:
    Minneapolis
    #1
    Hi,

    I'm trying to have an image anchored to the right side of my page. I'd like to set it up so that as you scale the window the image will always be on the farthest right edge of the page (also at the very top of the page). I'd like to do it without using tables, but a table will work too.

    Can anyone help?

    Thanks
     
  2. EricNau Moderator emeritus

    EricNau

    Joined:
    Apr 27, 2005
    Location:
    San Francisco, CA
    #2
    Adding the align="right" attribute to the img tag doesn't work?
     
  3. Muskie thread starter macrumors 6502

    Muskie

    Joined:
    Dec 1, 2003
    Location:
    Minneapolis
    #3
    you're right, it doesnt :p
     
  4. jamesarm97 macrumors 65816

    Joined:
    Sep 29, 2006
    #4
    <img align="right"> Works for me.

    I'm no expert, but you could try:

    <div align="right" style="float:right;z-index:100"><img src="images/bomber-01small.jpg"/></div>

    That would float it on the right and you could still have text and such on the left because of the float.

    - James
     
  5. Muskie thread starter macrumors 6502

    Muskie

    Joined:
    Dec 1, 2003
    Location:
    Minneapolis
    #5
    That doesn't work either. I've also tried:

    <img src="rightSide.png" alt="image" style="float: right; width:0px; height:0px; border:0;" />

    which doesn't seem to work. Should I have created something to align it inside? It almost seems like those methods are for aligning images to certain sides of a table or layer so that the text can flow around them.

    What I would like to achieve, is a flash navigation section (250x158px) on the left side, an image the repeats itself along the top (looking like a title or banner bar that matches part of the Flash portion) and then an image with a logo attatched to the right side.

    I have been inserting the flash nav into a layer, could that be what's messing it up?
     
  6. jamesarm97 macrumors 65816

    Joined:
    Sep 29, 2006
    #6
    Could be because both responses work for me.

    - James
     
  7. Muskie thread starter macrumors 6502

    Muskie

    Joined:
    Dec 1, 2003
    Location:
    Minneapolis
    #7
    Ok I think that was the problem. So instead of using a layer for the flash nav I just insert it, but then that and the right side image still wont flush up to the edges. They are anchored and work fine, but there is about a 10px border on each side of them. How can I get rid of that.
     
  8. MiniMan. macrumors regular

    Joined:
    Jan 2, 2007
    Location:
    UK
    #8
    Dont you just need to get rid of the page border?
     
  9. Muskie thread starter macrumors 6502

    Muskie

    Joined:
    Dec 1, 2003
    Location:
    Minneapolis
    #9
    that sounds like something i didnt know about, how do i do that. im just gonna redo it all with css now anyway. ive never heard of page borders.
     
  10. ChicoWeb macrumors 65816

    ChicoWeb

    Joined:
    Aug 16, 2004
    Location:
    California
    #10
    orrrrrr. make sure you haven' no margins for your body tag

    body {margin: 0;}
     
  11. Muskie thread starter macrumors 6502

    Muskie

    Joined:
    Dec 1, 2003
    Location:
    Minneapolis
    #11
    yea, i will be paying attention to that when i redo it. wont have time till the weekend though. thanks.
     

Share This Page