Jump to content

Welcome to Geeks to Go - Register now for FREE

Geeks To Go is a helpful hub, where thousands of volunteer geeks quickly serve friendly answers and support. Check out the forums and get free advice from the experts. Register now to gain access to all of our features, it's FREE and only takes one minute. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more.

Create Account How it Works
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