Re: Positioning of DIV tag in center of the screen




"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


.



Relevant Pages

  • Re: Positioning of DIV tag in center of the screen
    ... It was built with tables and cells but I ... So now I use the <DIV> tags. ... margin-right: auto; ...
    (alt.html)
  • Re: Positioning of DIV tag in center of the screen
    ... So now I use the <DIV> tags. ... margin-left: auto; ... margin-right: auto; ...
    (alt.html)
  • Positioning of DIV tag in center of the screen
    ... It was built with tables and cells but I ... So now I use the <DIV> tags. ... But how do I get this picture in the center of the screen? ...
    (alt.html)
  • Re: Blank Space at Bottom of Web?
    ... I only have "Use DIV ... tags when Positioning", and whether I enable or disable that one, I still ... Blank Space at Bottom of Web?Thanks to everyone for their comments. ... Microsoft MVP - Frontpage. ...
    (microsoft.public.frontpage.client)
  • Re: Blank Space at Bottom of Web?
    ... I don't think a refresh of the page would do anything to an improperly coded ... > FrontPage Resources, WebCircle, MS KB Quick Links, etc. ... >> OK, I got rid of all my <div> tags, and I've turned off the "Use div ... >>> generating all the tags. ...
    (microsoft.public.frontpage.client)