Welcome Guest [Log In] [Register]
Search Members Calendar | Rules ZB Code Index IF Code Index
ZBCode
  • Navigation
  • ZBCode
  • Coding Support
  • Code University
  • How To Do Fixed Backgrounds
Hey, welcome to ZBCode, the premier coding forum for ZB. Here you fill find some of the best Invisionfree and Zetaboards Codes on the network! Unfortunately, you're sorta hovering around in guest mode at the moment; why not join in on the fun? Register an account and you can start accessing the wealth of resources we have available here. Enjoy your stay at ZBCode, and remember to tell all your friends about us; the more members, the more codes available. ;)

Interested in joining? Click here.


If you are already a member of ZBCode, feel free to login right here:

Username:   Password:
Locked Topic
  • Pages:
  • 1
  • 2
How To Do Fixed Backgrounds
Tweet Topic Started: Mar 23 2009, 11:25 PM (450 Views)
Riaz Mar 23 2009, 11:25 PM Post #1
Member Avatar
Honered

Posts:
20
Group:
Member
Member
#2,645
Joined:
Mar 23, 2009
Coding language
Everything
Im trying to put up a custom background but im not sure how to fix the background because at the moment its all over the place.

Heres the bit im talkin about from my css


html,body {
background: url(http://z3.ifrm.com/10/168/0/f257108/Pulse_Main_bg.jpg) #0b0b0b;
color:#fff;
font-family:"Tahoma", "Arial", "Bitstream Vera Sans", "Verdana", sans-serif;
font-size:93.3%;
margin:0;
padding:0;
}


can someone please help me thank you.
Offline Profile Goto Top
 
HolySavior Mar 23 2009, 11:30 PM Post #2
Member Avatar
Modifying The World Around You

Posts:
2,488
Group:
Distinguished Coder
Member
#7
Joined:
Jul 2, 2008
Coding language
Everything
fix background like how?
Offline Profile Goto Top
 
Riaz Mar 23 2009, 11:49 PM Post #3
Member Avatar
Honered

Posts:
20
Group:
Member
Member
#2,645
Joined:
Mar 23, 2009
Coding language
Everything
SO WHEN YOU SCROLL DOWN THE BACKGROUND DOESNT MOVE...LIKE HOW U HAVE MYSPACE LAYOUTS WHERE YOU HAVE THE OPTION TO HAVE YOUR BACKGROUND FIXED....IS THAT POSSIBLE WITH zb?
Offline Profile Goto Top
 
PD.Phoenix Mar 24 2009, 12:04 AM Post #4
Member Avatar
Kokuhyou no Tentei

Posts:
326
Group:
Member
Member
#602
Joined:
Aug 15, 2008
Coding language
HTML/CSS
The background in your css there is a repeated background... O_o

a fixed background would be something like... a picture. Your's is a small pattern that needs to repeat to make the background.
Phoenix Designz is now open
Looking for staff and classers PM me here or on PD if interested.

Want to win some easy money? Enter Phoenix Designz tournaments. Learn more here ->> click


Posted Image
| My dA | Vote PD Top 100 |
Offline Profile Goto Top
 
Riaz Mar 24 2009, 09:36 AM Post #5
Member Avatar
Honered

Posts:
20
Group:
Member
Member
#2,645
Joined:
Mar 23, 2009
Coding language
Everything
Saikou
Mar 24 2009, 12:04 AM
The background in your css there is a repeated background... O_o

a fixed background would be something like... a picture. Your's is a small pattern that needs to repeat to make the background.
Thats Right,

So can someone please tell me the code or tags to have my background 'Fixed'? because i wanted my own custom background.

My current css is posted on my first post with the part i want edited for the fixed tags.
Edited by Riaz, Mar 24 2009, 09:54 AM.
Offline Profile Goto Top
 
Flavius Mar 24 2009, 04:48 PM Post #6
Member Avatar


Posts:
283
Group:
Member
Member
#360
Joined:
Jul 29, 2008
Coding language
HTML/CSS
Do you mean so it scrolls down when you scroll down and back up when you sroll back up?
Posted Image
Offline Profile Goto Top
 
Kevin Mar 24 2009, 05:24 PM Post #7
Member Avatar


Posts:
700
Group:
Former Staff
Member
#8
Joined:
Jul 2, 2008
Coding language
HTML/CSS
Add this to your CSS:

background-attachment: fixed;

Should do it for ya.
Posted Image
Offline Profile Goto Top
 
Riaz Apr 2 2009, 05:43 AM Post #8
Member Avatar
Honered

Posts:
20
Group:
Member
Member
#2,645
Joined:
Mar 23, 2009
Coding language
Everything
Kevin
Mar 24 2009, 05:24 PM
Add this to your CSS:

background-attachment: fixed;

Should do it for ya.
it didnt work kevin, i need some code thats gunna let me position my background in the center an not scroll down with the board i need the background to stay still.
Offline Profile Goto Top
 
lirts Apr 2 2009, 09:55 AM Post #9


Posts:
204
Group:
Member
Member
#207
Joined:
Jul 22, 2008
Coding language
HTML/CSS
You could just add fixed to the end of the CSS where the image link is.

Like this:

background:url(image_link) no-reapeat fixed;

So yours would be:

html,body {
background: url(http://z3.ifrm.com/10/168/0/f257108/Pulse_Main_bg.jpg) no-reapeat fixed #0b0b0b;
color:#fff;
font-family:"Tahoma", "Arial", "Bitstream Vera Sans", "Verdana", sans-serif;
font-size:93.3%;
margin:0;
padding:0;
}
Edited by lirts, Apr 2 2009, 09:56 AM.
"We fear that which we do not see."

"Our minds are limited by what we know, not what we believe."
Posted Image
Legion of Shadows! Join The Community! Join The RP! Join the Legion!! Click the pic to view!

Offline Profile Goto Top
 
Riaz Apr 2 2009, 02:09 PM Post #10
Member Avatar
Honered

Posts:
20
Group:
Member
Member
#2,645
Joined:
Mar 23, 2009
Coding language
Everything
Sorry it didnt work,

This Is What I Have an i want that background to me in the center an fixed so it doesnt scroll with the forum.

html,body {
background: url(http://z3.ifrm.com/10/168/0/f306278/Blue_BG.jpg) #071727;
color:#fff;
font-family:"Tahoma", "Arial", "Bitstream Vera Sans", "Verdana", sans-serif;
font-size:93.3%;
margin:0;
padding:0;
}

http://s1.zetaboards.com/Testmf/index/
Offline Profile Goto Top
 
1 user reading this topic (1 Guest and 0 Anonymous)
Go to Next Page
« Previous Topic · Code University · Next Topic »
Locked Topic
  • Pages:
  • 1
  • 2

Track Topic · E-mail Topic Time: 7:48 PM Jul 10
Hosted for free by ZetaBoards · Privacy Policy