Remove white space below image [duplicate]
You’re seeing the space for descenders (the bits that hang off the bottom of ‘y’ and ‘p’) because img is an inline element by default. This removes the gap: .youtube-thumb img { display: block; }
You’re seeing the space for descenders (the bits that hang off the bottom of ‘y’ and ‘p’) because img is an inline element by default. This removes the gap: .youtube-thumb img { display: block; }
If you want to remove leading and ending spaces, use str.strip(): >>> ” hello apple “.strip() ‘hello apple’ If you want to remove all space characters, use str.replace() (NB this only removes the “normal” ASCII space character ‘ ‘ U+0020 but not any other whitespace): >>> ” hello apple “.replace(” “, “”) ‘helloapple’ If you … Read more