Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Design zero margin images

  • This topic is empty.
Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #183748
    medina286
    Participant

    Hello all.

    I need to know how to make my site images with zero left space, like this site:

    http://brennocastro.com/

    I used this class applied to the image:

    .largura-cheia{
    width: 100%;
    height: 100%;
    }

    …but still I get a small margin.

    Can you help? Thank you.

    #183749
    Jerba
    Participant

    You can target specific margin directions using the CSS margin selectors.

    margin-left, margin-right,margin-top,margin-bottom

    I don’t think images have default margin, however, try setting the margin to 0 in the image selector.

    .largura-cheia  {
        width: 100%;
        height: 100%;
        margin: 0;
    }
    
    #183750
    medina286
    Participant

    sorry, I stil get a margin, nothing like http://brennocastro.com/content.html

    Thank you very much anyway.

    #183752
    medina286
    Participant

    Got it!

    css file:

    /* CSS Document */
    body{
    margin: 0;
    padding: 0
    }
    .largura-cheia {
    width: 100%;
    height: 100%;
    }

    It’s alive. Anyway you put me in the right track, thanks again.

    #183753
    Jerba
    Participant

    It’s alive. Anyway you put me in the right track, thanks again.

    No problem, I assume it was because the body still had its default margin?

    #183754
    medina286
    Participant

    Yes, it had noyhing to do with the image, of course, it was the body. Dumb Medina.

    #183756
    Jerba
    Participant

    Yes, it had nothing to do with the image, of course, it was the body. Dumb Medina.

    We learn from our mistakes

Viewing 7 posts - 1 through 7 (of 7 total)
  • The forum ‘Design’ is closed to new topics and replies.