2 Replies - 668 Views - Last Post: 15 July 2012 - 08:09 PM

#1 konk353535  Icon User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 165
  • Joined: 04-December 08

CSS question background image for header wont cover entire width

Posted 15 July 2012 - 07:03 PM

Hello so im very new to css and am making a repeat-x background image for the header but there is white spaces around the background repeating image how to get rid of these thanks for any help sorry for the stupid question i tried googling but didnt couldnt find anything as dont know what to search for

html:
<!doctype html>
<html>
<head>
	<meta charset="utf-8" />
	<link rel="stylesheet" href="css/style.css">
	<title>Tuts+ Premium Course</title>
</head>
<body>
	<div id="header">
	

	</div>

</body>
</html>


css:
#header{
	background-image: url('../images/bg-header.jpg');
	background-repeat: repeat-x;
	background-color: #373232;
	min-width: 1000px;
	width: 100%;
	height: 100px;
}





thanks for reading gladly appreciated

Is This A Good Question/Topic? 0
  • +

Replies To: CSS question background image for header wont cover entire width

#2 Atli  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 3719
  • View blog
  • Posts: 5,991
  • Joined: 08-June 10

Re: CSS question background image for header wont cover entire width

Posted 15 July 2012 - 07:35 PM

Are you talking about the border around the entire page body? The browsers automatically apply a small margin on the <body> of the page, so if you want your content to reach the very edge of the browser window you'll have to remove that margin.
body {
	margin: 0;
}


Was This Post Helpful? 1
  • +
  • -

#3 konk353535  Icon User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 165
  • Joined: 04-December 08

Re: CSS question background image for header wont cover entire width

Posted 15 July 2012 - 08:09 PM

hahaha im a noob thanks so much for that :) really appreciated kudo's
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1