Jump to content

Background image no repeat


newcoder

Recommended Posts

Hello,

 

I am simply trying to put the sky image with 100% full width of the screen. Not the width of the table. Could you please help?

 #header-wrapper1{   top: 0;   left: 0;   height: 107px;   width: 100%;}  <table id="header-wrapper1" width = "100%" style="background:url(sky.JPG) ;" ><tr><td>Some text</td></tr></table>

Everything is working fine except the width. width is not 100% of the full screen.

 

-Newcoder

Link to comment
Share on other sites

I'm not sure I understand why you are using a table. Is there a reason? Also why are you duplicating the styling inline?

<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><title>title</title><style>*{margin: 0;padding: 0;}#header{width: 100%;height: 107px;background-size:100% 100%;background-image: url(sky.jpg);background-repeat: no-repeat;}</style></head><body><div id="header"><p>some text</p></div></body></html>

http://www.w3schools.com/css3/css3_backgrounds.asp

Edited by davej
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...