How do I remove the gray border that surrounds background images?
So, you have an img element that doesn't have a src attribute, but it does have a background-image style applied.
I'd say that the gray border is the 'placeholder' for where the image would be, if you'd specified a src attribute.
If you don't want a 'foreground' image, then don't use an img tag - you've already stated that changing to a div solves the problem, why not go with that solution?
Parts of the background are forming a border around the red border
Seems fine to me, what exactly is the issue? This effect you described might be either yous screen blurring pixels in certain zoom levels, or a visual illusion called Mach bands
Remove strip background keep panel border
If you set element_blank()
for strip.background
and keep element_rect(colour="black", fill = NA)
for panel.border
then top edge of panel.border
will be black.
As pointed out by @adrien, for panel.background
fill should be set to NA to avoid covering of points (already set as default for theme_bw()
).
ggplot(mtcars, aes(mpg, hp)) + geom_point() +
facet_wrap(~carb, ncol = 3) + theme_bw() +
theme(panel.grid.major = element_blank(),
panel.grid.minor = element_blank(),
strip.background = element_blank(),
panel.border = element_rect(colour = "black", fill = NA))
Remove border on only one side for end li (Maintain splitting borders)
Give it a class and then assign a no right border to that class. Check it out:
HTML:
<div id="order">
<ul>
<li>Order</li>
<li>Account</li>
<li class="noRight">Login</li>
</ul>
</div>
CSS:
#order {
font-family: HelveticaLTStd-Light;
font-size:13;
position: absolute;
right:218;
top:-5;
}
#order ul li {
float:left;
padding: 5px;
border-right: 1px solid;
}
#order ul li.noRight {
border-right:0;
}
Heres a JSFiddle for you.
How to remove the bottom border of a box with CSS
Just add in: border-bottom: none;
#index-03 {
position:absolute;
border: .1px solid #900;
border-bottom: none;
left:0px;
top:102px;
width:900px;
height:27px;
}
How to remove ul unordered list's last li list item's border using CSS without changing anything in HTML code?
Add this style and you don't need to modify anything else:
#navlist li:last-child { border-right:0px; }
Edit:
Original Script
Original script to which the answer applies is posted here because jsbin.com may delete content not viewed for 3 months.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Sandbox</title>
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<style type="text/css" media="screen">
body { background-color: #fff; font: 16px Helvetica, Arial; color: #000; }
#navlist li
{
display: inline;
list-style-type: none;
padding:0 20px 0 20px;border-right:1px solid red;
}
/* !!!!!!!!!!!!!! PASTE ANSWER HERE TO MAKE THE FIX !!!!!!!!!!!!!!!! */
</style>
</head>
<body>
<p>Hello from JS Bin</p>
<p id="hello"></p>
<ul id="navlist">
<li id="active"><a href="#" id="current">Item one</a></li>
<li><a href="#">Item two</a></li>
<li><a href="#">Item three</a></li>
<li><a href="#">Item four</a></li>
<li><a href="#">Item five</a></li>
</ul>
</body>
</html>
Related Topics
CSS Absolute Positioned Elements and Margins
Difference Between These Two Style Rules
How to Display Block Div on Hover a Tag
CSS Background Image Not Appearing in Safari
What Does The Smiley Face ":)" Mean in CSS
Bootstrap Breakpoints... Need Some Clarification ' Xs Sm Md Lg'
How to Draw Vertical Separators in The Interior Gaps of a CSS Grid of Varying Columns
Class Selector Not Working in CSS, But Id Works for Add Some Styles
Style The Tawk.To Chat Widget with My Custom CSS
CSS - How to Make Responsive Images
Ie 8. Gradient Background+Image