HTML Help Forum Index HTML Help
Please Search for the answer to your question before asking it! Thanks.
 

Background not aligned correctly
Post a Reply to this Topic Ask a New Question
Click here to go to the original topic
       HTML Help Forum Index -> Images & Graphics
View previous topic :: View next topic  
Author Message
sumncguy



Joined: 21 Aug 2008
Posts: 3

Posted: Thu Aug 21, 2008 4:57 am     Background not aligned correctly  

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

Posted: Thu Aug 21, 2008 7:12 am      

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

Posted: Thu Aug 21, 2008 7:26 am      

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

Posted: Thu Aug 21, 2008 7:35 am      

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.
 
 
HOSTING / DESIGN
MAKE MONEY

       HTML Help Forum Index -> Images & Graphics
Page 1 of 1


Powered by phpBB Search Engine Indexer
Powered by phpBB 2.0.19 © 2001, 2002 phpBB Group