38 users online (0 members and 38 guests)  


  Results 1 to 8 of 8

Related

  1. <span>    Forum: CSS Forum
    Replies: 2
  2. can <span> do this?    Forum: CSS Forum
    Replies: 1
  3. can <span> do this?    Forum: HTML Forum
    Replies: 0
  4. Help Using Span    Forum: CSS Forum
    Replies: 1
  5. Span / border question    Forum: CSS Forum
    Replies: 2
  1. #1
    Aminalaizer's Avatar
    New User

    Status
    Offline
    Join Date
    Oct 2003
    Posts
    16

    Span,Scrollbars,Positions

    Hello,
    I have a Span element, for ower confort we called it "ToolBar":

    This is the code for the toolBar:

    <span style="position:absolute">
    <img height=20 width=20>
    <img height=20 width=20>
    <img height=20 width=20>
    <img height=20 width=20>
    <img height=20 width=20>
    <img height=20 width=20>
    </span>

    I made a script that check, If you move the mouse over any of specificly elements, and if yes The toolbar show on the element (Span.Left=element.left-20, Span.TOP=Element.TOP-20).

    My problem is:
    When the mouse come over an element that located in the right of the page. The images appear in 6 lines, and it's not look like a toolbar. I want that the images appear only in one line!
    How can I confirmation that always the toolbar will be in one line.

    I have two ideas how to solve that problem. I didn't succesfuly any of them:
    1) use wrap. (I don't know how use this property).
    2) check the width of the body. (It's not work.)

  2. #2
    QuietDean's Avatar
    Administrator

    Status
    Offline
    Join Date
    Oct 2000
    Location
    Bournemouth, UK
    Posts
    2,662

    Re: Span,Scrollbars,Positions

    Hiya,

    Could we have a link to your test page? that way we get all of it to play with.
    If one of our members helps you, please click the icon to add to their reputation!
    No support via email or private message - use the forums!
    Before you ask, have you Searched?

  3. #3
    Aminalaizer's Avatar
    New User

    Status
    Offline
    Join Date
    Oct 2003
    Posts
    16

    Re: Span,Scrollbars,Positions

    Here is Example Code:


    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
    <html>
    <head>
    <title></title>
    <meta name="GENERATOR" content="Microsoft Visual Studio.NET 7.0">
    <meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
    <script language="vbs">
    sub MoveSpan
    if window.event.shiftKey=true then
    a.style.left=window.event.offsetx
    a.style.top=window.event.offsety
    end if
    end sub
    </script>
    </head>
    <body onmousemove="vbs:MoveSpan">
    <span style="position:absolute;" id=a>
    <img width=20 height=20><img width=20 height=20><img width=20 height=20>a
    </span>
    </body>
    </html>


    Move the mouse over the screen, while you press the shift key.
    You can see that the span element move with the mouse.
    The problem is when you move the mouse to the right of the screen (near the scollbars) the 3 images are appear in 3 lines, but I want that they will be only in 1 line (one near one).

    Thank you,
    Aminadav.

  4. #4
    QuietDean's Avatar
    Administrator

    Status
    Offline
    Join Date
    Oct 2000
    Location
    Bournemouth, UK
    Posts
    2,662

    Re: Span,Scrollbars,Positions

    Doesn't do anything for me at all?

    I am using Mozilla Firebird on Windows XP
    If one of our members helps you, please click the icon to add to their reputation!
    No support via email or private message - use the forums!
    Before you ask, have you Searched?

  5. #5
    QuietDean's Avatar
    Administrator

    Status
    Offline
    Join Date
    Oct 2000
    Location
    Bournemouth, UK
    Posts
    2,662

    Re: Span,Scrollbars,Positions

    Ah. IE code only. Playing with it now.
    If one of our members helps you, please click the icon to add to their reputation!
    No support via email or private message - use the forums!
    Before you ask, have you Searched?

  6. #6
    QuietDean's Avatar
    Administrator

    Status
    Offline
    Join Date
    Oct 2000
    Location
    Bournemouth, UK
    Posts
    2,662

    Re: Span,Scrollbars,Positions

    Amend this line -
    Code:
    <span style="position:absolute;" id=a>
    to be this -

    Code:
    <span style="position:absolute; white-space: nowrap;" id=a>
    And it should work fine (at least, it does in IE6)
    If one of our members helps you, please click the icon to add to their reputation!
    No support via email or private message - use the forums!
    Before you ask, have you Searched?

  7. #7
    Aminalaizer's Avatar
    New User

    Status
    Offline
    Join Date
    Oct 2003
    Posts
    16

    Re: Span,Scrollbars,Positions

    Thank you,
    It's work beautifully.

    When you move the SPAN elment to the right of the window a vertical scrollbar show on the bottom of the page.

    How can I check where is the mouse, and if you in the right of the window, the SPAN will located in the maximum right place that don't needs vertical scrollbar?

    (screenx,offsetright,etc') I have a problem with that propeties, when I was in tables.

    Am I clear?

  8. #8
    QuietDean's Avatar
    Administrator

    Status
    Offline
    Join Date
    Oct 2000
    Location
    Bournemouth, UK
    Posts
    2,662

    Re: Span,Scrollbars,Positions

    You have reached my limit of knowledge in DHTML I dont use it that often.

    I see here a good example of detecting the edge of someones screen, see if it helps http://www.jsr.communitech.net/screen.htm
    If one of our members helps you, please click the icon to add to their reputation!
    No support via email or private message - use the forums!
    Before you ask, have you Searched?



Tags for this Thread