Questions tagged [border]

A border is a graphical user interface construct that is used to surround and/or highlight something that is contained within.

A border is a graphical user interface contruct that is used to surround and/or highlight something that is contained within. Borders are often seen as visible rectangles of a specified width, though they could be of any shape.

5856 questions
1750
votes
11 answers

How to remove focus border (outline) around text/input boxes? (Chrome)

Can anyone explain how to remove the orange or blue border (outline) around text/input boxes? I think it only happens on Chrome to show that the input box is active. Here's the input CSS I'm using: input { background-color: transparent; …
Joey Morani
  • 25,431
  • 32
  • 84
  • 131
816
votes
23 answers

How to put a border around an Android TextView?

Is it possible to draw a border around an Android TextView?
yamspog
  • 18,173
  • 17
  • 63
  • 95
778
votes
21 answers

How to remove the border highlight on an input text element

When an HTML element is 'focused' (currently selected/tabbed into), many browsers (at least Safari and Chrome) will put a blue border around it. For the layout I am working on, this is distracting and does not look right.
user170579
  • 8,180
  • 6
  • 24
  • 21
688
votes
15 answers

Placing border inside of div and not on its edge

I have a
element and I want to put a border on it. I know I can write style="border: 1px solid black", but this adds 2px to either side of the div, which is not what I want. I would rather have this border be -1px from the edge of the div.…
TheMonkeyMan
  • 8,622
  • 8
  • 27
  • 42
630
votes
12 answers

Should I use 'border: none' or 'border: 0'?

Which of the two methods conforms to W3C standards? Do they both behave as expected across browsers? border: none; border: 0;
John Himmelman
  • 21,504
  • 22
  • 65
  • 80
437
votes
25 answers

Is there an easy way to add a border to the top and bottom of an Android View?

I have a TextView and I'd like to add a black border along its top and bottom borders. I tried adding android:drawableTop and android:drawableBottom to the TextView, but that only caused the entire view to become black.
emmby
  • 99,783
  • 65
  • 191
  • 249
427
votes
8 answers

How to reset / remove chrome's input highlighting / focus border?

I have seen that chrome puts a thicker border on :focus but it kind of looks off in my case where I've used border-radius also. Is there anyway to remove that?
Jiew Meng
  • 84,767
  • 185
  • 495
  • 805
396
votes
21 answers

How to increase space between dotted border dots

I am using dotted style border in my box like .box { width: 300px; height: 200px; border: dotted 1px #f00; float: left; } I want to the increase the space between each dot of the border.
Kali Charan Rajput
  • 12,046
  • 10
  • 35
  • 46
380
votes
18 answers

Border for an Image view in Android?

How can I set a border for an ImageView and change its color in Android?
Praveen
  • 90,477
  • 74
  • 177
  • 219
349
votes
21 answers

How to do gradient borders in CSS

I'm trying to apply a gradient to a border, I thought it was as simple as doing this: border-color: -moz-linear-gradient(top, #555555, #111111); But this does not work. Does anyone know what is the correct way to do border gradients?
Mark
  • 32,293
  • 33
  • 107
  • 137
298
votes
9 answers

Remove white space below image

In Firefox only my video thumbnails are displaying mysterious 2-3 pixels of white space between the bottom of my image and its border (see below). I've tried everything I can think of in Firebug with no luck. How can I remove this white space?
Ryan
  • 6,027
  • 16
  • 52
  • 89
268
votes
8 answers

How to set a border for an HTML div tag

I am trying to define a border around a div tag in HTML. In some browsers the border does not appear. Here is my HTML code: