Forums

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

Home Forums CSS Centre Images with 100% width, and remove small padding between the edge.

  • This topic is empty.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #279748
    DreamingInsanity
    Participant

    First of all, is it possible to centre an image with 100% width (and height), so that the center of the image is in the centre of the webpage, no matter what size the image or the webpage is, and make sure the image covers the whole screen?

    And secondly, when I move the image around, I can’t get it to go exactly to the edge of the browser, unless I am using transform, but I would have to edit that for every image I use. When I try to, there is about a five pixel padding, of the background, between the edge of the image and the edge of the browser. No matter what I use – ‘padding: 0px !important / font-size: 0px !important / display: block !important, that padding will not go away.

    Hopefully I haven’t asked for too much, feel free to do it one question at a time!
    Dream.

    #279753
    Beverleyh
    Participant

    Sorry but we can’t troubleshoot a description. If you put a basic demo into CodePen showing what you’ve tried, we can offer suggestions on how to fix your code problem.

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.