Not signed in (Sign In)

SkillShare - A place to discuss Web Standards and Web Design topics

Categories

Vanilla 1.1.9 is a product of Lussumo. More Information: Documentation, Community Support.

    •  
      CommentAuthorcrash_D.
    • CommentTimeNov 9th 2007
     permalink
    hi... i want a site to be centered both horizontally and vertically... the site is enclosed in a container of small width and height... i did it with IE, but not with other browsers... i created a single but huge talbe cell, in which i told to valign="middle" but opera and ff dont understand it... could you help me plz...

    problem: i need to make a small site vertically centered at the document on any screen resolution...

    the site is http://cherdakstudio.com.ua

    thanks
  1.  permalink
    You could try this method http://d-graff.de/fricca/center.html
    •  
      CommentAuthorjernigani
    • CommentTimeNov 9th 2007
     permalink
    There's also this solution.

    It doesn't work in IEmac, but otherwise should do you fine.

    http://www.mycelly.com/css_templates/css_template_11.htm
    • CommentAuthorPettyRider
    • CommentTimeNov 10th 2007
     permalink
    vertical-align affects inline, inline-block elements only (this includes the text inside block elements [a P tag is one element, the text inside of it is another. Learn the DOM.]), just so you know.
    •  
      CommentAuthorcrash_D.
    • CommentTimeNov 10th 2007 edited
     permalink
    Thanks for the links guys.. i will check them and post the result

    @PettyRider: you did not understand the problem, there is nothing to do with vertical-align CSS property, but a vertical align as a general term.. i suggest you don't strike people until you understand the problem (and the people).. thanks anyway..

    edit: if i find solution in any of your suggestions, i will sure give "thanks" to the author... :)
    • CommentAuthork3liutZu
    • CommentTimeNov 13th 2007
     permalink
    If you know the width and height of your container. You can simply do

    #container { position: absolute; top: 50%; left: 50%; margin: -Xpx 0 0 -Ypx; }

    where X and Y are half of the containers width and height
Add your comments
    Username Password
  • Format comments as (Help)