Forums

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

Home Forums CSS Best practice for image sizing (this or that)

  • This topic is empty.
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #32901
    Rugg
    Participant

    Hello. I was wondering which of these methods is considered the best practice for defining image height/width. Thank you for the suggestions!

    OR

    In css/style.css:

    img.large {
    width: 700px;
    height: 400px;
    }
    #75133
    chrisburton
    Participant

    My personal opinion is to use CSS for images. It’s just easier to go into your stylesheet and make the changes to a group instead of one by one. As for best practice, it’s more of a preference.

    #75119
    chrisburton
    Participant

    Hmm, I’ve never heard that before. May I ask who told you this? I use inline styling when a stylesheet is not needed because the code is too limited to load an additional file.

    #75121
    chrisburton
    Participant

    I believe though that if your loading an external stylesheet in your head section that it is to be rendered before anything else. Wouldn’t that totally disprove this theory if you have img tags in your body using inline styling?

    #75094
    TheDoc
    Member

    A reminder to not be resizing very large images (ie 2mb) because the end user will still have to download the entire image.

    #74878
    Bluehound
    Member

    If you have a lot of images that are not the same size, using just css can be more cumbersome. But, ideally it is best. As for image resizing, you shouldn’t really be using the browser to do that at all.

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