Jump to content

CSS - Like Twitter

- - - - -

  • Please log in to reply
12 replies to this topic

#1 Tech

Tech

    Champion

  • Registered Members
  • PipPipPipPip
  • 491 posts

Posted 27 October 2009 - 09:08 PM

The backgrounds on twitter are ''stuck'' there and when you scroll down the content scrolls but the background doesnt, how do you do this in CSS?

Thanks

#2 Static_

Static_

    Adept

  • Registered Members
  • 211 posts
  • LocationGB

Posted 27 October 2009 - 09:10 PM

Just add;

background-attachment: fixed;

to your background image bit in the CSS.
NintendoLounge - My Nintendo Forum :)

#3 Michael

Michael

    Zealot

  • Members
  • 1753 posts

Posted 28 October 2009 - 06:14 AM

StaticAge said:

Just add;

background-attachment: fixed;

to your background image bit in the CSS.

It has to be one of the most simple pieces of CSS with such great results :D

#4 FullMetalBabe

FullMetalBabe

    Zealot

  • Registered Members
  • 2923 posts

Posted 28 October 2009 - 07:08 AM

Lol, it can be put in one line to make it more simple.



background: url(image) top left fixed no-repeat;

Posted Image


#5 Tech

Tech

    Champion

  • Registered Members
  • PipPipPipPip
  • 491 posts

Posted 28 October 2009 - 11:34 AM

Thanks everyone, ganno try putting a game or picture on the background of JetGaming to make it even more gamier (if thats a word)...


What would the recommended size be?

#6 tryfuhl

tryfuhl

    Champion

  • Members
  • PipPipPipPip
  • 391 posts

Posted 01 November 2009 - 05:01 AM

Tech said:

Thanks everyone, ganno try putting a game or picture on the background of JetGaming to make it even more gamier (if thats a word)...


What would the recommended size be?
check the analytics of your forum to see what resolutions most people are using

I guess it really depends on the layout of your site though.. static or fixed, etc

#7 FullMetalBabe

FullMetalBabe

    Zealot

  • Registered Members
  • 2923 posts

Posted 01 November 2009 - 07:35 AM

=\ A logo shouldn't be bigger than 900px, it could be a bit too big, I try to keep mines at 600-700 px unless I intend to put many images.

Posted Image


#8 tryfuhl

tryfuhl

    Champion

  • Members
  • PipPipPipPip
  • 391 posts

Posted 01 November 2009 - 10:34 AM

define logo

#9 ArnyVee

ArnyVee

    Oozing Machismo Since 1972

  • Registered Members
  • 1194 posts

Posted 01 November 2009 - 10:45 AM

How do you make it so that you can "tile" the image and keep it "fixed" as well?

#10 Static_

Static_

    Adept

  • Registered Members
  • 211 posts
  • LocationGB

Posted 01 November 2009 - 10:49 AM

ArnyVee said:

How do you make it so that you can "tile" the image and keep it "fixed" as well?

Just add;

background-repeat: repeat;

So you have;

background-attachment: fixed;
background-repeat: repeat;

Or if you have it in one line like FMB said, then;

background: url(bgimage.gif) top left fixed repeat;    
NintendoLounge - My Nintendo Forum :)

#11 FullMetalBabe

FullMetalBabe

    Zealot

  • Registered Members
  • 2923 posts

Posted 01 November 2009 - 11:08 AM

I should add if you want it to repeat horizontally ONLY you could add:

background: url(bgimage.gif) top left fixed repeat-x;

Or vertically ONLY

background: url(bgimage.gif) top left fixed repeat-y;

Posted Image


#12 WI

WI

    Newcomer

  • Members
  • 1 posts

Posted 11 December 2009 - 07:25 AM

what about  css code to autofit bg different screen size?? i heard css3 support stretching bg to fit screen but browsers not supported....

#13 FullMetalBabe

FullMetalBabe

    Zealot

  • Registered Members
  • 2923 posts

Posted 11 December 2009 - 08:16 AM

Blah, I know I'm wrong, dunno.

Posted Image





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

About Admin Addict
Admin Addict is community for forum admins and staff to interact and share ideas. Admin Addict is a newbie friendly community so even if you're new to forums you will be welcome here.
Copyright © 2010-2012 Schwarz Network. All rights reserved.