#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2003
    Posts
    8
    Rep Power
    0

    External CSS and highlight/cut/paste


    I'm using external style sheets on a couple of sites, and have the following problem:

    When I click and drag down over the text, to copy & paste it into an email or whatever, all the text on that page is automatically highlighted .... I can't control the drag / selection, it's all or nothing.

    When I click and drag upwards, nothing happens at all ... it won't work.

    Any way to solve this? I don't get this problem with internal style sheets.

    Andy
  2. #2
  3. No Profile Picture
    *foo = *bar;
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2003
    Location
    Wheaton, IL
    Posts
    179
    Rep Power
    45
    Huh?
    What editor are you using?
  4. #3
  5. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2003
    Posts
    8
    Rep Power
    0
    Sorry, I mean when I attempt to cut & paste text from the web page itself, when it's online --- those web pages governed by an external style sheet are the ones giving the problem described, while those sites in which I'm using internal style are fine.

    Just can't see what the cause might be ...
  6. #4
  7. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2003
    Posts
    8
    Rep Power
    0
    Sorry! I mean copy text from a web page .... posting late at night, brain in wrong gear.

    Basically, when I click-drag, all text on my web pages with external CSS is highlighted, and I can't make a selection.
  8. #5
  9. No Profile Picture
    *foo = *bar;
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2003
    Location
    Wheaton, IL
    Posts
    179
    Rep Power
    45
    You say "Basically, when I click-drag, all text on my web pages with external CSS is highlighted, and I can't make a selection."

    If it is "highlighted' then it IS "selected."
    Post a URL so we can see what you are talking about (I have sites with both and no problems). Also what platform (Windoze or Mac?), OS?, and browser and version?

    We need the facts.
  10. #6
  11. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2003
    Posts
    8
    Rep Power
    0
    Wasn't sure if posting URLs was OK -- here's a page --

    http://www.tullpress.com/nme27aug77.htm

    As soon as I click / drag the entire page is highlighted: I can't limit the selection to a single paragraph, for example.

    Windows 98, IE6.

    Andy
  12. #7
  13. No Profile Picture
    *foo = *bar;
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2003
    Location
    Wheaton, IL
    Posts
    179
    Rep Power
    45
    Can't help you. I works fine on Mac IE, Netscape and Safari; and Windoze Netscape. But you are correct, not in Windoze IE. But why is this a big issue?
  14. #8
  15. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2003
    Posts
    8
    Rep Power
    0
    It's an issue because I can't copy a small selection of text for the purposes of quoting in an email or on a discussion forum -- also, visitors can't use the Print Selection function.

    I've visited other web sites using external CSS which don't have this bug .... so I'm curious to know what they're doing with their CSS that I'm not .....
  16. #9
  17. No Profile Picture
    *foo = *bar;
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2003
    Location
    Wheaton, IL
    Posts
    179
    Rep Power
    45
    Try adding:

    Code:
    media="screen"
    to your link tag.

    I have external style sheets and in IE Windows it's just fine.

    Here's mine:
    Code:
    <link rel="stylesheet" href="motf.css" media="screen" type="text/css" />
  18. #10
  19. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2003
    Posts
    8
    Rep Power
    0
    This didn't work, but I think I've found where the problem's coming:

    External CSS includes the following two rules:

    body { margin: 0px; }

    .body {
    top: 120px;
    bottom: -120px;
    width: 100%;
    position: absolute;
    }


    And it's only those pages which are using the <div class="body"> element which have this trouble with highlighting ..... pages using different div classes for right & left columns of text are fine.

    On the site linked to above, again I just have a single div element enclosing all the main text on the page, <div class="text">, with the CSS containing:

    .text {
    left: 15%;
    width: 85%;
    position: absolute;
    }

    So .... is there something about having columns of text which would make a difference, or something to do with how I've named the div elements in the CSS ...? 'Body' is probably not a wise choice, come to think of it ....?

    Andy
  20. #11
  21. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2004
    Posts
    2
    Rep Power
    0
    Hi. I am having the same problem with my layers based site... i.e., an inability to copy/paste/high-light text on the published site in IE.

    Was wondering wether any further solutions had been found.. the remendies suggested in the posts above did not work for me, and when checking out the link provided in one of the above posts, it seems that the problem still persists.

    Thanks,

    T
  22. #12
  23. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2004
    Posts
    2
    Rep Power
    0
    Found the solution... its apparently caused by a bug in IE6 which prevents text from being copied from most absolutely positioned elements. For more info and the solution go to:
    http://blog.tom.me.uk/2003/07/23/boie6selecta.php

    Cheers,
    T

IMN logo majestic logo threadwatch logo seochat tools logo