Results 1 to 2 of 2

Thread: center a layer and nesting layer help needed?

  1. #1
    Join Date
    Feb 2007
    Posts
    1

    Question center a layer and nesting layer help needed?

    hi guys.

    i just wanted to create a web page with centralized layers in dreamweaver. so i googled and found the following css which will do the needfull

    center layers with css

    but unfortunately i couldnt nest anyother layers after i added this CSS and the centered layer with this css is not shown in the layers window too..if anyone can help me with it please??

    or is there is any other method to do my needs much better

  2. #2
    Join Date
    Feb 2006
    Location
    Salisbury UK
    Posts
    4,332
    The link says
    This box is horizontally centered by setting its right and left margin widths to "auto". This is the preferred way to accomplish horizontal centering with CSS, and works very well in most browsers with CSS2 support. Unfortunately, IE5/Win does not respond to this method - a shortcoming of that browser, not the technique.

    The work-around is for IE5 which is long out of date and I don't expect many computers have it now. Do you know that many of your viewers are using very old computers? If not I suggest you ignore the work-around.

    Carry on using the margin: auto method which needs a div width for it to work.

    Or use width: 600px; left: 50%; margin-left: -300px; you need to set the width to suit your page but note that the margin-left is always half the div width.

    http://www.wickham43.supanet.com/tut...eringdivs.html
    Code downloaded to my PC will be deleted in due course.
    WIN7; IE9, Firefox, Opera, Chrome and Safari for Windows; screen resolution usually 1366*768.
    Also IE6 on W98 with 800*600 and IE8 on Vista 1440*900.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •