2 replies [Last post]
dubosegriffin
dubosegriffin's picture
Offline
newbie
Last seen: 2 years 41 weeks ago
Timezone: GMT-4
Joined: 2011-10-05
Posts: 1
Points: 2

Greetings,

I am using an image as the background for a web site page. I would like to put a simple white thin border on the left hand side of this image.

Can this be done. Here is the code for the background image:

body
{
background: #5D5D77 url(images/sunrise.gif) no-repeat center;
background-position:top right;
margin-top: 900px;
}

Thank you,
DuBose Griffin

Tony
Tony's picture
Offline
Moderator
Brisbane
Last seen: 6 hours 10 min ago
Brisbane
Timezone: GMT+10
Joined: 2003-03-12
Posts: 5076
Points: 2654

Hi dubosegriffin, the easiest

Hi dubosegriffin,
the easiest way would be to edit the image and put the border on that.

You could also look into multiple backgrounds but browser support may be an issue.

jackR
jackR's picture
Offline
Regular
Denver
Last seen: 1 year 18 weeks ago
Denver
Timezone: GMT-6
Joined: 2009-04-13
Posts: 33
Points: 35

You could also use a white

You could also use a white background and using padding to push the image over what every distance you deem appropriate and there by get the white border you are looking for. for example:

div {
background: url(yourImage) #FFF;
padding-left: ?px;
width: ?;
height: ?;
}
 
In this way, you would not have to alter the image.