SitePoint Sponsor

User Tag List

Results 1 to 7 of 7
  1. #1
    SitePoint Enthusiast
    Join Date
    Mar 2008
    Location
    Connecticut
    Posts
    50
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    I'm using layers to position, is this "good"

    I'm about half way through my web site. I have an arrayed background that fills the screen. My customer wants the web page to have a plain background over that where all the info goes. To do that I have made a layer and given it a plain very pale pale green background. On that I put my text and pictures, sometimes using another layer on top of it to position something exactly. Because this is my first web site I am not proficient using DIVs only to place things, but I really want this to be a "correct" site. I am using CSS all over the place but I am worried that layers might not be the best thing to do. My Sitepoint book "The CSS Anthology 101 Essential Tips, Tricks and Hacks" doesn't mention layers, nor does "Build your own Web Site The Right Way". I am using Dreamweaver and coding where I can. What about layers? Are they OK?

  2. #2
    SitePoint Addict palgrave's Avatar
    Join Date
    Jan 2006
    Posts
    357
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Layer is another word for <div>

  3. #3
    SitePoint Enthusiast
    Join Date
    Mar 2008
    Location
    Connecticut
    Posts
    50
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    hmmmm. Thanks.

  4. #4
    SitePoint Wizard bronze trophy Centauri's Avatar
    Join Date
    May 2007
    Location
    Newcastle, Australia
    Posts
    3,718
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by palgrave View Post
    Layer is another word for <div>
    Not quite. "Layer" is Dreamweaver-speak for "absolutely-positioned div", and should never be considered anything different. There is no such thing as "layers" in html.

  5. #5
    SitePoint Enthusiast
    Join Date
    Mar 2008
    Location
    Connecticut
    Posts
    50
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ahhh. This makes much more sense to me. Thank you very much. In the mean time I am getting better at defining my elements by doing straight mark-up. It's amazing how fast I am learning. I think my learning curve is logrythmic. Thanks to all of you who are willing to help this enthusiastic beginner to learn the right way. My site is really coming along nicely.

  6. #6
    SitePoint Member chromaticsites's Avatar
    Join Date
    May 2008
    Posts
    14
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Centauri View Post
    Not quite. "Layer" is Dreamweaver-speak for "absolutely-positioned div", and should never be considered anything different. There is no such thing as "layers" in html.
    A "layer" in XHTML/CSS is commonly referred to as an absolutely positioned div with a z-index. By applying z-index selectors to divs, you can essentially "layer" your divs so that they will display above or below each other. This is accomplished by using the position: absolute; attribute as well, as Centauri just explained.

    This must be what susuyaya was referring to when he mentioned layers: an absolutely positioned div with the z-index selector is essentially a layer.
    Chromatic Sites professional web design

  7. #7
    SitePoint Addict palgrave's Avatar
    Join Date
    Jan 2006
    Posts
    357
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I stand corrected. Thank you.


Bookmarks

Posting Permissions

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