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.

5352 questions
1472
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
  • 21,793
  • 29
  • 79
  • 126
701
votes
19 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
  • 7,400
  • 6
  • 22
  • 21
575
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
  • 20,084
  • 20
  • 61
  • 79
557
votes
14 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
  • 7,184
  • 7
  • 23
  • 40
421
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
  • 95,927
  • 63
  • 178
  • 243
392
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
  • 74,635
  • 166
  • 442
  • 756
358
votes
17 answers

Border for an Image view in Android?

How can I set a border for an ImageView and change its color in Android?
Praveen
  • 86,996
  • 72
  • 173
  • 215
322
votes
18 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
  • 10,526
  • 9
  • 31
  • 45
271
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
  • 5,523
  • 16
  • 48
  • 84
234
votes
9 answers

Android - border for button

How do I add a border to a button? Is it possible to do this without resorting to use of images?
jeffreyveon
  • 12,818
  • 17
  • 72
  • 113
216
votes
9 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: