Jump to content

Welcome to Geeks to Go - Register now for FREE

Need help with your computer or device? Want to learn new tech skills? You're in the right place!
Geeks to Go is a friendly community of tech experts who can solve any problem you have. Just create a free account and post your question. Our volunteers will reply quickly and guide you through the steps. Don't let tech troubles stop you. Join Geeks to Go now and get the support you need!

How it Works Create Account
Photo

centering my bg...


  • Please log in to reply

#1
ggordie

ggordie

    Member

  • Member
  • PipPip
  • 40 posts
could someone tell me a code for centering a fixed bg?
  • 0

Advertisements


#2
ssone

ssone

    Member

  • Member
  • PipPipPip
  • 301 posts
<style type="text/css">
body {
padding: 0px;
margin: 0px;
background-image: url(../folder/picture.jpg);
background-repeat: no-repeat;
background-position: center;
background-attachment: fixed;
background-color: White; /*change color to suit*/
color : #000; /*change color to suit*/
}
</style>

Edited by ssone, 28 July 2005 - 11:32 AM.

  • 0

#3
sscott

sscott

    Member

  • Member
  • PipPip
  • 11 posts
padding, margin, and color don't really need to be in there.. but i guess its ok since i read something outlining that he only knew html x.0
  • 0

#4
ssone

ssone

    Member

  • Member
  • PipPipPip
  • 301 posts
ummmmmmm...thats why i created the whole thing for him, instead of leaving him in the dark :tazz:
  • 0

#5
Ibatex

Ibatex

    New Member

  • Member
  • Pip
  • 8 posts
Also, be sure it's placed between the head tags.
  • 0

#6
ssone

ssone

    Member

  • Member
  • PipPipPip
  • 301 posts
haha..since some seem to be worried you may not know where to put this (which is def a possibility):

<html>
<head>

<style type="text/css">
body {
padding: 0px;
margin: 0px;
background-image: url(../folder/picture.jpg);
background-repeat: no-repeat;
background-position: center;
background-attachment: fixed;
background-color: White; /*change color to suit*/
color : #000; /*change color to suit*/
}
</style>
</head>
<body>
</body>
</html>

  • 0






Similar Topics

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

As Featured On:

Microsoft Yahoo BBC MSN PC Magazine Washington Post HP