Issue with image padding on website

Discussion in 'Web Design, HTML And CSS' started by lemoert, Apr 5, 2009.

  1. lemoert

    lemoert New Member

    Joined:
    Mar 31, 2009
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    0
    Hi,

    I have recently gotten into programming in order to create a website for myself. Today I was changing it a bit and came across something strange that I seem unable to fix. I added an iframe containing a page that displays random images, this page does however seem to have some sort of padding to the right of the image that I cannot remove. I tried to add a width attribute to the stylesheet but that does not change anything for some reason. I have no idea how to solve this and it is quite annoying as this white field prevents me from placing the image where I want it and still keeping things looking good. Any ideas of how to solve this?
    You can find it on the news section on nantitel.net, should be fairly obvious what I am talking about.

    Kind regards,
    Martin
     
  2. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,375
    Likes Received:
    388
    Trophy Points:
    83
    Either you need to change the content of the page or else you need to make your iframe goes to some negative value
     
  3. lemoert

    lemoert New Member

    Joined:
    Mar 31, 2009
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    0
    Hi,

    How could I change the page in any way, it only contains the script for the random image as far as I can see? And, I do not fully understand what you meant by changing the iframe to a negative value, the below is what I currently have in my stylesheet, I tried changing the width to -10px but that seems to do nothing (it is at no value at the moment as the height acts up if there is no width value what so ever).

    HTML:
    div.newsimg {
        position:absolute; bottom:15%; right:0%;
        background-color:#FFFFFF
        width:;
        height:188px;                          
        z-index:2}
    Would you be able to explain what you meant in more detail?

    Thanks for the help,
    Martin
     
  4. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,375
    Likes Received:
    388
    Trophy Points:
    83
    You are importing a url into iframe and mention the position of the iframe as absolute and then specify the top left as needed and it would take -ve values as well.
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice