It seems impossible to specify the height of a border; it will automatically adjust to the element's height. Consider using an image instead, as you have more control over its dimensions.
If desired, you can implement something similar to this:
Check out this example
In the code snippet, the first <div>
sets the overall height, while the second one displays the border line below it. The .test1
has a dotted line and .test2
features a solid line, illustrating that they are aligned on the same level. This creates the illusion of setting the border for .test1
, when in reality, another <div>
is responsible for defining the border.
An alternative approach could be seen here: Click here for an example
I hope this explanation clarifies things for you.