Re: Positioning of DIV tag in center of the screen
- From: "123Jim" <jnkjnjnini@xxxxxxxxxxxxxxxxxxxxx>
- Date: Tue, 25 Jan 2011 17:26:54 -0000
"Fokke Nauta" <fnautaNO@xxxxxxxxxx> wrote in message
news:8q85uhFejgU1@xxxxxxxxxxxxxxxxxxxxx
Hi all,
I am redesigning my website. It was built with tables and cells but I
learned that that's not done anymore. So now I use the <DIV> tags.
An example of this is in www.pc3.nl/test. In the example page test.htm I
use <div class="container"></div> and in my style sheet I use:
.container {
background-image: url(main.jpg);
position: relative;
height: 525px;
width: 980px;
}
This works and I get the picture in my screen. This is only an example, on
the real page there are links and a text window.
But how do I get this picture in the center of the screen? With a table
and a cell it was piece of cake, but how can I achieve this with a DIV tag
and a style sheet?
Is it possible anyway?
..container {
background-image: url(main.jpg);
position: relative;
height: 525px;
margin-left: auto;
margin-right: auto;
width: 980px;
}
^^ centered horizontally
.
- Follow-Ups:
- Re: Positioning of DIV tag in center of the screen
- From: Fokke Nauta
- Re: Positioning of DIV tag in center of the screen
- References:
- Positioning of DIV tag in center of the screen
- From: Fokke Nauta
- Positioning of DIV tag in center of the screen
- Prev by Date: Re: <form> re-direct by radio button choice
- Next by Date: Re: <form> re-direct by radio button choice
- Previous by thread: Positioning of DIV tag in center of the screen
- Next by thread: Re: Positioning of DIV tag in center of the screen
- Index(es):
Relevant Pages
|