SitePoint Sponsor

User Tag List

Results 1 to 8 of 8

Hybrid View

  1. #1
    SitePoint Enthusiast Roj2002's Avatar
    Join Date
    Jan 2002
    Posts
    81
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Unhappy Picture at the top right corner

    I'm not sure if this is the right forum...

    Take a look at an early stage of a new page I'm doing:

    http://www.m-fuerst.com/vida-nueva/

    As you see I use here a small background picutre that is reapeated horizontaly and verticaly.

    I've also this pictures at the top right corner (the one with the kids). And here is my problem:

    I want this picture at the top right corner (now there is a small gab to the right border...)! The solution should be resolution AND browser independent!

    Is there any way to do this?

    Now I'm using layers:

    <div align="right" id="layer_01">
    <img align="right" src="../images/back2.gif" alt="" width="316" height="221" border="0">
    </div>

    But as you can see it is not working!

    Michael

  2. #2
    Xbox why have you forsaken me? moospot's Avatar
    Join Date
    Feb 2001
    Location
    Clearwater, FL
    Posts
    3,615
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Try this:

    Code:
    <style>
    <!--
    IMG.right {float:right}
    //-->
    </style>
    
    
    <img src="foo.gif" class="right">

  3. #3
    SitePoint Wizard creole's Avatar
    Join Date
    Oct 2000
    Location
    Nashvegas Baby!
    Posts
    7,845
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    No, he's already got the parent DIV aligned right.

    I think your problem here is the fact that you are using too many DIV tags. Keep in mind that DIV tags come complete with a full carriage return after the closing tag.

    You're sort of building that page wrong. There's no reason to use so many DIV tags. Not when you could use a combination of DIVs and the float property that Moo suggested.

    Also, are you "doing" anything with these DIVs? Are you planning on showing them or hiding them with Javascript? If you're not going to perform any action upon them, then there's no reason to give each DIV it's own ID. ID's are only used when you want to "do" something to an item. in this case, you're simply using DIV's as containers and you can get rid of the ID.
    Adobe Certified Coldfusion MX 7 Developer
    Adobe Certified Advanced Coldfusion MX Developer
    My Blog (new) | My Family | My Freelance | My Recipes

  4. #4
    Xbox why have you forsaken me? moospot's Avatar
    Join Date
    Feb 2001
    Location
    Clearwater, FL
    Posts
    3,615
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    In my example, I am not using <div> tags. I am using it on a page where there are no layers. The style will float the image on the right and wrap the text around it.

  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)
    Sorry...when I said "he" I was referring to Roj2002, not you Moo.
    Adobe Certified Coldfusion MX 7 Developer
    Adobe Certified Advanced Coldfusion MX Developer
    My Blog (new) | My Family | My Freelance | My Recipes

  6. #6
    Xbox why have you forsaken me? moospot's Avatar
    Join Date
    Feb 2001
    Location
    Clearwater, FL
    Posts
    3,615
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

  7. #7
    SitePoint Enthusiast Roj2002's Avatar
    Join Date
    Jan 2002
    Posts
    81
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hello ,

    Thanks for the help so far. Unfortunately all your tips didn't help.
    There is allays a gap between the picture and the right border!

    Even if I remove everything else from the HTML code, there is this gap (except in Netscape V 6.x), so it's probably not related to me using that much div- tags...

  8. #8
    SitePoint Wizard creole's Avatar
    Join Date
    Oct 2000
    Location
    Nashvegas Baby!
    Posts
    7,845
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Have you made sure it's not the image itself? Is it posible that the gap is actually on the image?
    Adobe Certified Coldfusion MX 7 Developer
    Adobe Certified Advanced Coldfusion MX Developer
    My Blog (new) | My Family | My Freelance | My Recipes


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
  •