 |
|
|
| 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. |
|
|
|
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
|
|
|
|
|
 |
|
|
|
|
|
|
|