Search results
Jan 27, 2013 · 3272. This border is used to show that the element is focused (i.e. you can type in the input or press the button with Enter). You can remove it with outline property, though: outline: none; You may want to add some other way for users to know what element has keyboard focus though for usability.
To get around the problem you can use border-bottom, with it set margin-bottom: -1px (the size of the border). This will stop it from moving the content below. HTML: CSS: width: 100px; height: 100px; background: #eee; width: 100px; height: 100px;
148. Edit: text-stroke is now fairly mature and implemented in most browsers. It is easier, sharper and more precise. If your browser audience can support it, you should now use text-stroke first, instead of text-shadow. You can and should do this with just the text-shadow effect without any offsets: .outline {. color: #fff;
stroke: #646464; stroke-width: 1px; stroke-dasharray: 2,2; stroke-linejoin: round; Worked for me: Chrome 27+, Linux. This code creates an outline of the original shape. In order to add an outline to an existing solid shape, I removed the fill: none;; line. Worked very nicely!
Mar 4, 2023 · Note: css filters are not at all supported in IE (let's hope Spartan does better), here is a compatibility table. This first snippet (fiddle) will apply the simplest border possible. img {. -webkit-filter: drop-shadow(1px 1px 0 black) drop-shadow(-1px -1px 0 black); filter: drop-shadow(1px 1px 0 black)
Mar 22, 2011 · There is the solution if you need only outline without border. It's not mine. I got if from Bootstrap css file. If you specify outline: 1px auto certain_color, you'll get thin outer line around div of certain color. In this case the specified width has no matter, even if you specify 10 px width, anyway it will be thin line.
Mar 7, 2012 · Border through outline css property. Here is another approach, but this way the border would be outside of the box. Here is an example. As follows from the example, you can use css outline property, to set the border that does not affect the width and height of the element. This way, the border width is not added to the width of an element.
Feb 4, 2016 · 29. Use a negative offset for the outline when the div is focused, like so: .inner:focus {. outline-offset: -10px; } The value should be equal to the outline-width. As an alternative approach you might also use an inset box-shadow e.g. box-shadow: inset 0 0 0 10px #ff0; edited Feb 4, 2016 at 12:46.
Apr 2, 2015 · Easy: set element outline to 0px solid transparent, then set element:focus border-left, border-right, border-top and border-bottom accordingly. As it’s currently written, your answer is unclear. Please edit to add additional details that will help others understand how this addresses the question asked.
Oct 12, 2013 · outline: 5px #FFF; border-radius: 80px; This works for small images, not too large of ones. If you want to use the round edge system on larger images, you will have to do just as someone else stated and use the following code: -moz-border-radius:0 0 10px 10px; -webkit-border-radius: 0 0 10px 10px; border-radius:0 0 10px 10px; border:1px solid gray;