I need to change the length of the dash in a border bottom. I want to make the length of each dash 30px. Is there any chance to do this without using any images?
Asked
Active
Viewed 7,160 times
1
-
this you can not do in pure css, see: http://stackoverflow.com/questions/6250394/how-to-increase-space-between-dotted-border-dots/6250467#6250467 – Martin Turjak Jul 02 '13 at 09:29
-
no, the length of the dash can't be fine-tuned. – Fabrizio Calderan Jul 02 '13 at 09:29
1 Answers
6
Without any images it's impossible. But it can be done without loading any images — with CSS gradients (which are basically generated images):
background: linear-gradient(to right, currentColor 0%, currentColor 50%, transparent 50%, transparent 100%) repeat-x left bottom;
background-size: 60px 1px;

Ilya Streltsyn
- 13,076
- 2
- 37
- 57
-
that's a cool idea ... similarly, for more sophisticated patterns without loading external images you could also use data-uri backgrounds in the css. – Martin Turjak Jul 02 '13 at 09:52