SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Member
    Join Date
    Mar 2002
    Posts
    18
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    layer/dHTML question

    Basically I have a table with ~750px width centered in the middle of the page. What I need is to have a layer whose left edge is the same as the left edge of the table.

    While I can predict the pixels from the left the layer needs to start when I know the size of the browser window, I don't know what resolution the person is browsing in. I know I can use JavaScript functions to get the screen resolution of the person browsing my site, but I can't get the width of the window -- or can I?

    Is there any other way to get my layer to appear at the correct place?

    thanks!

  2. #2
    What? Maelstrom's Avatar
    Join Date
    Oct 2001
    Location
    Whistler BC originally from Guelph Ontario
    Posts
    2,175
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    position:relative

    It will place the object in relative fasion (sp) to the object of placement. If you play with it a bit and want it to be relative to the right

    position:relative;
    right:0px;
    top:20px

    that would place it 20px down for the top and on the right side of the table.
    Maelstrom Personal - Apparition Visions
    Development - PhP || Mysql || Zend || Devshed
    Unix - FreeBSD || FreeBsdForums || Man Pages
    They made me a sitepoint Mentor - Feel free to PM me or Email me and I will see if I can help.

  3. #3
    SitePoint Member
    Join Date
    Mar 2002
    Posts
    18
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for your help...

    However, originally I was wanting to make the position of the layer absolute because that way it doesn't move the surrounding content around -- when it's relative it takes up the space within the span or div.

    Anyways, I've modified the way I'll do the table to go with relative. However, Netscape 4.x adds this annoying spacing around the outside of the layer.

    Have a look at:
    http://active.vaporspace.net/~krusty...dex_new3.shtml

    to see what I'm talking about. In Netscape 4.x, there's this purple space around my layer. In IE it's a-ok. Y?

    thanks...

  4. #4
    SitePoint Member
    Join Date
    Mar 2002
    Posts
    18
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Argh....

    I guess that had to do with the background image of the layer. Okay fine. I got rid of that and it will show up fine in Netscape 4.x However, I need a background image either in the table cell housing the layer or in my layer -- thanks to my elite designers...

    They really need to learn some HTML/CSS/JS.

    Anyways, at this point I'm simply going to not support NS4.x anymore. It looks fine in AOL's browser, hopefully it will when they go Mozzilla as well... NS4.x = damaged goods.

  5. #5
    What? Maelstrom's Avatar
    Join Date
    Oct 2001
    Location
    Whistler BC originally from Guelph Ontario
    Posts
    2,175
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    ...thats the way it always ends up. NN4.7 doesn't fully support css or newer javascript tricks. Useless browser.
    Maelstrom Personal - Apparition Visions
    Development - PhP || Mysql || Zend || Devshed
    Unix - FreeBSD || FreeBsdForums || Man Pages
    They made me a sitepoint Mentor - Feel free to PM me or Email me and I will see if I can help.


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
  •