This is a discussion on "Simple CSS Question" within the Web Page Design section. This forum, and the thread "Simple CSS Question are both part of the Design Your Website category.
|
|
|
|
|
![]() |
||
Simple CSS Question
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
#1
|
|||
|
|||
|
Simple CSS Question
I'm sorry to ask such a simple question, but my mind has gone to mush.
I'm currently designing a website and I want my background to be static, i.e. when you scroll down the page the background doesn't move it's just the text that scrolls up. |
|
|
|
#2
|
|||
|
|||
|
Re: Simple HTML Question
body {
background: fixed; } |
|
#3
|
|||
|
|||
|
Re: Simple HTML Question
background-attachment: fixed;
Last Blog Entry: Apps every Mac based web dev should consider (Jul 10th, 2008)
|
|
#4
|
|||
|
|||
|
Re: Simple HTML Question
Yeah its not really html thats more a css question. but the two above both work.
Put what Lchad said in your <head> section |
|
#5
|
|||
|
|||
|
Re: Simple HTML Question
|
|
#6
|
|||
|
|||
|
Re: Simple HTML Question
im not sure if that works in all browsers so your better off with Lchads and moojoos way.
|
|
#7
|
||||
|
||||
|
Re: Simple HTML Question
No, that is not correct HTML or CSS.
|
|
#8
|
|||
|
|||
|
Re: Simple HTML Question
Ok its like this:
body{ background-image: url(image.jpg); background-position: fixed center; } I believe... I dont use it to much. I've only used it once. Its mostly done for myspace users. |
|
#9
|
||||
|
||||
|
Re: Simple HTML Question
Still incorrect. The longhand is:
http://ryanfait.com/articles/2006/10...css-shorthand/ |
|
#10
|
|||
|
|||
|
Re: Simple HTML Question
Oh dear! There are 2 things wrong in that simple little chuck code
If majo323 comes back ... here's what's wrong: 1- the background attribute is deprecated and should be replace with CSS (see Ryan's last post) 2- Where did you get the fixed attribute?! I don't see it anywhere in the list of attributes from the W3C There ... hope that help you understand what moojoo and Ryan were saying about the code you wrote |
![]() |
| Tags |
| static background |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| hopefully a simple question | newoptical | Hosting & Domains | 9 | Sep 21st, 2007 22:02 |
| simple question | Daniel | Web Page Design | 29 | Feb 6th, 2007 17:23 |
| a simple question (I think) | Colm Osiris | Web Page Design | 2 | Feb 5th, 2006 09:17 |
| A simple Question... | Lizard- | Classic ASP | 11 | Aug 11th, 2004 08:45 |