HTML Tutorial


 Forum HomeForum Home   FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
RegisterRegister - Not registered yet? Got something to say? Join HTML Code Tutorial!
Background not aligned correctly
Post new topic   Reply to topic    HTML Help Forum Index -> Images & Graphics
View previous topic :: View next topic  
Author Message
sumncguy



Joined: 21 Aug 2008
Posts: 3

PostPosted: Thu Aug 21, 2008 4:57 am     Background not aligned correctly Reply with quote

Im a rookie ... learning HTML from this site info.

I have a index.html that sets up frames and calls a sidebar.html and main.html.

The background on the main.html is a picture/photo. It looks great on my desktop, but when I look at it on my laptop, a wider screen format, I see the background, lets say, one and a quarter times.

How do I fix that ?

Thanks
[/img]
sticks464



Joined: 31 Dec 2006
Posts: 1283

PostPosted: Thu Aug 21, 2008 7:12 am     Reply with quote

Use the no-repeat css to stop image from repeating in wider screens
Code:
body {background: url(myImage.jpg) no-repeat;}

or if using inline css
Code:
<body style="background:url(myImage) no-repeat;">
sumncguy



Joined: 21 Aug 2008
Posts: 3

PostPosted: Thu Aug 21, 2008 7:26 am     Reply with quote

Yes thanks. I tried that but then get white space where the one quarter of the image used to be.
sticks464



Joined: 31 Dec 2006
Posts: 1283

PostPosted: Thu Aug 21, 2008 7:35 am     Reply with quote

For now set a background color to show where the image ends
Code:
body {background: #000000 url(myImage.jpg) no-repeat;}

#000000 being the hex code for the color black.

I am not on my computer at this time or I would give you the code to scale the background image or to fix the image so it does not scroll with the content.

It's one of the problems faced with todays wide screen monitors, we never know what screen size or resolution sites will be viewed.
Display posts from previous:   
Post new topic   Reply to topic    HTML Help Forum Index -> Images & Graphics All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
HTML Help Archive
Powered by phpBB © 2001, 2005 phpBB Group
HTML Help topic RSS feed 

 
HOSTING / DESIGN
MAKE MONEY

Home
  |   Tutorials   |   Forum   |   Quick List   |   Link Directory   |   About
Copyright ©1997-2002 Idocs and ©2002-2007 HTML Code Tutorial