Background no-repeat problem

Status
Not open for further replies.

Medax

New Member
Feb 14, 2014
3
0
Hello guys,
i had a little problem with my background when coding a simple template, here is the body code :
Code:
body
{
    margin: 0px;
    padding: 0px;
              background-image:url(bg.png);
              background-repeat:no-repeat;
    font-family: 'lucida grande',tahoma,verdana,arial,sans-serif;
}
but the problem is that the no-repeat doesn't work, and it shows a white border in the side.
Does anyone have a solution ?
Thank you.
 

GarettM

Posting Freak
Aug 5, 2010
833
136
Id advise you to use css reset and also maybe your browser is trying to do your job.

try {
HTML:
<style>
html,body { margin: 0; padding: 0; }
body {
   /** No reason to repeat margin, padding again. **/
    background: url('bg.png') no-repeat;
    font-size: 13px;
    font-family: 'lucida grande', tahoma, verdana, arial, sans-serif;
}
</style>
}
 

Sysode

Front-End Developer
Dec 11, 2012
1,673
848
You may want to add the extras for browser support purposes, @Medax

Code:
-webkit-background-size: cover; /* safari */
  -moz-background-size: cover; /* Mozilla */
  -o-background-size: cover; /* Opera */
  background-size: cover;

@Markshall close the thread man.
 
Status
Not open for further replies.

Users who are viewing this thread

Top