[thelist] VERY basic CSS question
Marcus Andersson
marcus at bristav.se
Tue May 18 11:54:56 CDT 2004
I would go
body {
background: #fff url(back.jpg) repeat-x top;
margin : 0;
padding : 0;
text-align: center;
min-width: 760px;
}
div.container {
background: #fff url(mainback.jpg) no-repeat ;
margin : auto auto;
text-align : left;
width : 760px;
height : 470px;
}
Or something like that anyway... the code is untested but should work.
/Marcus
Rob Smith wrote:
> Hey,
>
> There's my css:
>
> <style type="text/css">
> body {
> background: #fff url(back.jpg) repeat-x top;
> width: 760px;
> margin: 0px;
> padding: 0px;
> }
> div.container {
> background: #fff url(mainback.jpg) no-repeat ;
> margin: 0px;
> padding: 55px;
> width: 760px;
> height: 470px;
> align: center;
> }
> </style>
>
> Here's my body:
>
> <body>
> <div class="container">
> <img src="title.gif">
> Hello World
> </div>
> </body>
>
> For the life of me I cannot get the "container"'s background image to be
> centered on the page:
>
> +---------+----+ +--+----------+--+
> | is | | | | want | |
> | | | | | | |
> +---------+ | | +----------+ |
> | | | |
> | | | |
> +--------------+ +----------------+
>
> What am I missing?
>
>
> Rob Smith
More information about the thelist
mailing list