Give Tab Space Instead Of Multiple Non Breaking Spaces With nbsp




Here we consider how to give Tab Space Instead Of Multiple Non Breaking Spaces. Lets start with one example here. We can provide HTML space by using nbsp. Suppose we have two imgaes which are separated by nbsp as shown below.

Tab Space Instead Of Multiple Non Breaking Spaces With nbsp, Alternative For Multiple Non Breaking Spaces With nbsp, Space Instead Of Multiple Non Breaking Spaces, Replace Multiple Non Breaking Spaces With Magin and Padding, nbsp with margin and padding, Replace nbsp with margin and padding, Non Breaking Spaces, nbsp, margin, padding, HTML, PHP, CSS

The style given for these images are here.

.clsDiv {
     background-color: yellow;
     margin-top: 50px;
     height: 300px;
}

.clsImg {
     width: 400px;
     height: 300px;
}



On runtime, it would look like this.

Tab Space Instead Of Multiple Non Breaking Spaces With nbsp, Alternative For Multiple Non Breaking Spaces With nbsp, Space Instead Of Multiple Non Breaking Spaces, Replace Multiple Non Breaking Spaces With Magin and Padding, nbsp with margin and padding, Replace nbsp with margin and padding, Non Breaking Spaces, nbsp, margin, padding, HTML, PHP, CSS

But instead of nbsp, we can give HTML space by using CSS only. All we needs to use magin or padding of element for providing space. In the above example, instead of nbsp, we can use margin of images as follows.

.clsImg {
     width: 400px;
     height: 300px;
     margin-right:30px;
}



The result will be like this.

Tab Space Instead Of Multiple Non Breaking Spaces With nbsp, Alternative For Multiple Non Breaking Spaces With nbsp, Space Instead Of Multiple Non Breaking Spaces, Replace Multiple Non Breaking Spaces With Magin and Padding, nbsp with margin and padding, Replace nbsp with margin and padding, Non Breaking Spaces, nbsp, margin, padding, HTML, PHP, CSS