Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Selected div appears with a border on selected on chrome and safari

I dont know if this can be fix, but I made this website and when my users click on some divs the selected div appears to have yellow border in chrome and similar border in safari. You can see the yellow border here enter image description here. Is it possible to disable this?

like image 253
Juan Diego Avatar asked Feb 10 '12 03:02

Juan Diego


People also ask

How do I disable borders?

Go to Design > Page Borders. In the Borders and Shading box, on the Page Border tab, select the arrow next to Apply to and choose the page (or pages) you want to remove the border from. Under Setting, select None, and then select OK.

How do I keep the border from changing size in CSS?

To avoid the width or height getting increased or decreased when using CSS properties like margin , padding , etc, we can use the CSS property called box-sizing and set its value to border-box on the element in CSS.

Can we give border to div?

Just go to your stylesheet. css and type border: solid black 2px; in your div section.

Does border Add to width CSS?

By default in the CSS box model, the width and height you assign to an element is applied only to the element's content box. If the element has any border or padding, this is then added to the width and height to arrive at the size of the box that's rendered on the screen.


2 Answers

Try adding this in your CSS:

*:focus {     outline: none; } 

That should get rid of the focus highlight for the whole page.

like image 112
E.Z. Hart Avatar answered Sep 20 '22 23:09

E.Z. Hart


I know this is old, but for reference for others is that the div becomes selectable in Chrome once the tabIndex property is added. a trick was used to make the tabIndex negative for elements that could not be tabbed to but even then the select rectangle was shown.

like image 44
Dragon Ace Avatar answered Sep 23 '22 23:09

Dragon Ace