简体   繁体   中英

Border around DIVs

I've been building this website without problems in Firefox, and when I start to use chrome for cross browser testing, I've noticed a slight border around my <div> .

在此处输入图像描述

This is what it's supposed to look like without border

在此处输入图像描述

But notice the slight yellow border around the div when I clicked in one of the empty spaces of the div.

I've had a similar problem with the images before, whereby I added a border:0 and it's solved, however, for this issue, I've tried border:0 , border:none , outline:0 and they all don't seem to work.

This is quite urgent and I appreciate any help from you guys.

Please do not hesitate to ask me any questions that may aid in the solving of this problem.

Thanks in advance

EDIT

Just learnt that this is a chrome's focus indicator, is the conventional border:0 , border:none workable for this type?

Use pseudo selector Element:focus { Outline:none; }

That yellow border is the "focus" indicator. Whereas in IE it's a dotted outline, Chrome adds a yellow border like that.

I have yet to find a reliable way to get rid of it, unfortunately, but double-check you've added the border-removing styles to the right element.

The style of that div should be in a single block if that div is called in css.maindiv let it stands alone

.div{
border:0px;
}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM