html - CSS - Repeating Header/Footer Image - Tied to content, but not above bottom of screen -



html - CSS - Repeating Header/Footer Image - Tied to content, but not above bottom of screen -

i wanted have site has repeating image across top , bottom of webpage.

i able have background repeating across top of page/body/screen, can't bottom background work.

for bottom, i'm trying repeat along x axis similar top, if content doesn't fill window/screen, want image tied bottom of screen. if content larger window/screen, want footer tied content (off screen until scroll downwards see it.)

when tried, footer display in div , wouldn't repeat border of screen, nor display under content (only in footer div) becoming nightmare!

is possible?

any help appreciated! thanks!

but want next have content (header / content , footer text etc) centered , fixed width. below along lines of have far.

http://jsfiddle.net/kuhfkhr4/

html, body { margin:0; padding:0; height:100%; background-image: url("/images/backgrounds/light-top-small-2014.jpg"); background-position: top center; background-repeat: repeat-x; } #wrapper { min-height:100%; position:relative; } #header { padding:10px; } #content { padding:10px; padding-bottom:180px; } #footer { background-image: url("/images/backgrounds/light-bottom-small-2014.jpg"); background-position: bottom center; background-repeat: repeat-x; width:100%; height:180px; position:absolute; bottom:0; left:0; }

edit also notice how bottom image cutting off. want footer text start 150px bottom, want image extend total 300px height is. div in unfortunately cuts off. ideas?

jsfiddle

add class.

#header{text-align:center;} #footer{text-align:center;}

html css background

Comments

Popular posts from this blog

Delphi change the assembly code of a running process -

json - Hibernate and Jackson (java.lang.IllegalStateException: Cannot call sendError() after the response has been committed) -

C++ 11 "class" keyword -