Forums

sizing not working with image tag (12 posts)

  1. danielPh
    Member
    Posted 1 year ago #

    I am using the TwentyTen theme and when I try to specify image size within the image HTML tag, there is no change in the JPG image size. It all works within the W3Schools site, but not with my JPG files.

  2. danielPh
    Member
    Posted 1 year ago #

    Further to the above, changing the width and height values in the image tag coding changes the image when I switch to visual editing mode, but upon doing an update and then viewing the page, image reverts to original size.

  3. esmi
    Theme Diva & Forum Moderator
    Posted 1 year ago #

    You shouldn't change an image's dimensions by changing the img tags height & width. You'll either end up with a very poorly rendered image or your site's visitors will be forced to download a larger image than needed.

  4. Rev. Voodoo
    Volunteer Moderator
    Posted 1 year ago #

    Also, you can't add html in html tab, then switch to visual. You must stick with html tab.

  5. danielPh
    Member
    Posted 1 year ago #

    Thanks for the reply Esmi. I'm fairly new to HTML and CSS and have been using the W3schools tutorials where they discuss using the image tag to resize images via the width and height values? What am I missing? .

  6. esmi
    Theme Diva & Forum Moderator
    Posted 1 year ago #

    You're not missing anything. W3schools are simply giving out really bad advice. The quality of the images that are resized in this way is pretty dreadful. Plus you end up with people embedding 1000 x 1000px images and then "resizing" them to 150 x 150px - which results in slow page downloads because the pages are actually full of huge images.

    Wherever possible, upload images of the correct size or chose the most appropriate size created by WordPress post-upload.

  7. danielPh
    Member
    Posted 1 year ago #

    Thanks esmi, I'll eventually get there with this sort of help. What else should I ignore from W3schools :) ?

  8. DaisyMariposa
    Member
    Posted 1 year ago #

    Daniel,

    If you want to learn how to write HTML code, you really ought to buy a book.

    I've been writing HTML code for about 15 years, and I've never found W3Schools to be of much help.

  9. danielPh
    Member
    Posted 1 year ago #

    Thanks Daisy, I've got a book, the W3Schools book :). What would you suggest? Thanks again.

  10. keesiemeijer
    moderator
    Posted 1 year ago #

  11. DaisyMariposa
    Member
    Posted 1 year ago #

    Daniel,

    I'm not presently where I have access to my HTML and CSS books.

    One excellent publisher is friendsofED, an Apress company. That's friends (all lower case), of (all lower case), ED (all uppercase) -- all run together as one word.

    I was the Technical Editor on some of their Flash and ActionScript books several years ago. (I haven't worked on any of their HTML or CSS books.)

  12. danielPh
    Member
    Posted 1 year ago #

    Thanks guys, I'll definitely follow your suggestions up.

Topic Closed

This topic has been closed to new replies.

About this Topic