I don't know why my border style do not work with position: sticky; attribute. I would like to set border styles on my sticky table header. But I don't want to use the transparent background colour. How can I achieve it? Here are sample codes for my problem and JSFiddle Link #wrapper { width: 400px; height: 200px; overflow: auto; } table { width: 100%; text-align: center; border-collapse: collapse