Problem: There is a background for a container. The problem is that the background doesn’t cover the contents of that container. Now you need to stretch or scale to fill its container. Solution: The code: HTML: CSS: Explanation: background-size defines Read more
Problem: A webpage contains some contents with footer. You want to keep the footer always at the bottom whether the contents go pretty far down or not even enough content to go all the way to the bottom of the Read more
Problem: You have a form that contains input fields with the placeholder. The default color of the placeholder is light gray. You need to change the color of the placeholder. Solution: If you want to change the color to pink, Read more
Problem: You want to embed a PDF file on your html page. And you’re looking for the best way to do that. Solution: The best way of embedding a PDF file is to use the <object> tag. The code: Explanation: Read more
Problem: You want to put a background on the contents (texts or image) and make it transparent using opacity. But you don’t want to change opacity of your contents. HTML: CSS: By doing this, both background and text become in Read more
Problem: There are two inline-block elements in your page. Suppose HTML: And, the CSS: Here, you used “display:inline-block” to control margin and padding on inline elements. But, this “inline-block” creates a problem making whitespaces between inline-block elements. You need to Read more
Problem: You have a “iframe” section in your page that holds another page. Now you need to add some CSS to style the <iframe> tag.