2 replies [Last post]
popunonkok
popunonkok's picture
Offline
newbie
Last seen: 10 years 29 weeks ago
Timezone: GMT+2
Joined: 2010-06-17
Posts: 2
Points: 4

Hi

First of, I have tried to search but since I do not actually know what to search for its kind of hard. I'm sorry if the answer to my question is easily found by searching.

So, on to my questions.

How do I create a "flowing" background like the one that can be found at this page?:
http://www.safarista.com/index.html
If one shrinks the window the background moves to the left so that the art in the background stays in place, relative to the rest of the page. Any tip is appreciated.

The second question is: If i have a horizontal menu on top consisting of a div and want a image/art to hover in front of the menu and stretch vertically over, in front and below the menu. An example could be a person standing in front of a horizontal menu.

Hope I make some kind of sense. Smile

Thanks in advance.

//Peter

CupidsToejam
CupidsToejam's picture
Offline
Guru
Florida
Last seen: 5 years 19 weeks ago
Florida
Timezone: GMT-4
Joined: 2008-08-15
Posts: 2637
Points: 1556

popunonkok wrote: How do I

popunonkok wrote:

How do I create a "flowing" background like the one that can be found at this page?

Not sure I understand the question, but here is the code he is using for the background.

body {
   background-color:#3C1606;
   background-image:url("images/safaristabg_02.jpg");
   background-position:center top;
   background-repeat:no-repeat;
   margin:0;
   padding:0;
}

Quote:

If i have a horizontal menu on top consisting of a div and want a image/art to hover in front of the menu and stretch vertically over, in front and below the menu. An example could be a person standing in front of a horizontal menu

Ive done something like that here. with the menu. This technique uses sprite navigation. You could also play around with absolute positioning, and or, z-index.

The second question is: If i have a horizontal menu on top consisting of a div and want a image/art to hover in front of the menu and stretch vertically over, in front and below the menu. An example could be a person standing in front of a horizontal menu.

Hope I make some kind of sense. Smile

Thanks in advance.

//Peter

thepineapplehead
thepineapplehead's picture
Offline
Guru
Last seen: 44 weeks 17 hours ago
Joined: 2004-06-30
Posts: 9668
Points: 801

CupidsToejam

CupidsToejam wrote:
popunonkok wrote:

How do I create a "flowing" background like the one that can be found at this page?

Not sure I understand the question,

I think he means that the bg-image moves when the window is resized. You're quite right, the "background-position: center top;" controls how it moves.

Verschwindende wrote:
  • CSS doesn't make pies