[CSS] Removing white space between images
2 posts
Page 1 of 1
Hello,
For my course work I had to put together a website using sliced images and one problem with this is you get white space between the images.
Like this:
How do we remove those annoying spaces?
We can remove the spaces using CSS we only need one line of text and it's for the img tag.
What is float?
For my course work I had to put together a website using sliced images and one problem with this is you get white space between the images.
Like this:
How do we remove those annoying spaces?
We can remove the spaces using CSS we only need one line of text and it's for the img tag.
Code: Select all
All we are doing is applying float left to all images. If you need it applied to specific images you can create an id or a class (classes are .something and id is #something) and then use float:leftimg
{
float: left;
}
What is float?
With CSS float, an element can be pushed to the left or right, allowing other elements to wrap around it.After:
Float is very often used for images, but it is also useful when working with layouts. - W3 Schools
My name is Tom | Visit my blog where I post new content every day! Tom's Daily Blog | MineCraft is awesome!
Good tutorial and easy to understand, Thanks. Now I should probably work on some of my course work aswell
2 posts
Page 1 of 1
Copyright Information
Copyright © Codenstuff.com 2020 - 2023