News:

Tekforums.net - The improved home of Tekforums! :D

Main Menu

Fixed background, scroll middle

Started by neXus, August 17, 2006, 11:23:56 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

neXus

Just seen gamespot
http://uk.gamespot.com/

H8 the use of the actual background to fussy but i like the scroll of the center element, how is this done?

brummie

surely its just

margin-left: auto;
margin-right: auto;

skidzilla

Do you mean something like this?


/* CSS Fixed Background */
body {background: black url(your-background.jpg) 0 0 no-repeat fixed;}

neXus

Quote from: skidzillaDo you mean something like this?


/* CSS Fixed Background */
body {background: black url(your-background.jpg) 0 0 no-repeat fixed;}

that would be what i did not know what to do -  fixed; in bg properties.

Clock'd 0Ne

Im surprised you never knew of that one, its an old property :-)

neXus

Quote from: Clockd 0NeIm surprised you never knew of that one, its an old property :-)

I know of it of course, its just the implementation of it with the background in terms of an actual image background of that type.
http://www.zdnet.co.uk/i/z/ads/pa/Skins/Darkly/scanner-darkly-bg.jpg
Making it work in all window sizes etc in how it is

Always the odd things you learn

I now know a really clever and dead easy way to do rounded boxes which is 10 times better then I did before for example

I also now know how (still only using Divs) to do a box with some content in that can hide and appear with a click of top bar or something and changes colour.
You can do it many ways but the code I got with it now is so easy and works in all browsers.

Always learning m8 :)

Clock'd 0Ne

I dont learn so fast, tables the way forward, etc  :P  :-)

addictweb

Dont spose I can enquire about the rounded boxes?

Ive always wondered an easy way to do it, I use a complex table with images in each section, most tricky.
Formerly sexytw

M3ta7h3ad


M3ta7h3ad

Ahhh think I found it.

http://www.html.it/articoli/nifty/index.html

Rather nifty!! :D lol

Edit: ahhh Im loving the DOM section, rather interesting! :)

neXus

Quote from: sexytwDont spose I can enquire about the rounded boxes?

Ive always wondered an easy way to do it, I use a complex table with images in each section, most tricky.

Quote from: M3ta7h3adAhhh think I found it.

http://www.html.it/articoli/nifty/index.html

Rather nifty!! :D lol

Edit: ahhh Im loving the DOM section, rather interesting! :)

Forget having Javascript

http://www.5thdigital.com/development/Round_corners/round.html

Images needed are in link

css:
body {
color:#ffffff;
}

.bl {background: url(bl.gif) 0 100% no-repeat #737373; width: 20em}
.br {background: url(br.gif) 100% 100% no-repeat}
.tl {background: url(tl.gif) 0 0 no-repeat}
.tr {background: url(tr.gif) 100% 0 no-repeat; padding:10px}
.clear {font-size: 1px; height: 1px}


Html:



Home







I am a big round box, huray
oooh, fancy








M3ta7h3ad

aaaaahhh but that loads images like what i said earlier :) prefer the javascript way to be honest :) as you dont have to use the javascript, it just means it takes out the tag.

neXus

Quote from: M3ta7h3adaaaaahhh but that loads images like what i said earlier :) prefer the javascript way to be honest :) as you dont have to use the javascript, it just means it takes out the tag.
You do need the javasctript, I will wait for you to realise why :)

I avoid using it, do everything not to have javascript, somone has it off your site is buggered becuase the layout will not be the intended output.

Css sometimes is a pain but at least you can make it work on everyones machine.

And yes images but not crappy table or complex code.

addictweb

Very nice, some good methods there, neXus seems most intuitive but M3ta7h3ads will cut down on page size without the images if its an issue.

Oooo, I want to make a site with roundy bits!
Formerly sexytw

M3ta7h3ad

lol tom :) Just knocked up a simple image gallery last night, auto thumbnailing goodness!! :D lol, now just need to shove it all in roundy bits :D