[Last Call] Learn how to a build a cloud-first strategyRegister Now


Why when using divs you cannot select individual text.

Posted on 2004-11-10
Medium Priority
Last Modified: 2010-04-06
I noticed since i moved to divs instead of using tables for layout of my pages, that text is no longer selectable, sometimes you can select a paragraph, but most of the time if i drag and highlight I get half the page or some wiered selection of parts.

Why is this?


What am I doing wrong,


How can design my pages better to allow for text to be selectable down the character.

Question by:redcable
  • 2
LVL 53

Expert Comment

ID: 12556189
It's the nature of the beast. They are different elements with different characteristics; why you expect them to behave the same way?  


Author Comment

ID: 12558771
uh I dont expect them to work the same way. just a little insight on if im doing things correct, or there is a better way to do them to be a better designer. hense...

why is this,

what am i doing wrong

and how can i design my pages better to allow for text to be selectable down to the character.

LVL 53

Expert Comment

ID: 12559269
If you show a sample of the code I'll be happy to look at it and see if there is anything wrong with it.

LVL 10

Accepted Solution

eeBlueShadow earned 500 total points
ID: 12580961
The general idea is that text is selectable in the order it appears in the HTML file, rather than how it appears on screen.

If you have a div in the bottom right of the screen, followed by a div in the top left, drag-selecting from the middle of each div will select the last bit of the bottom right and the first bit of the top left (I hope that made sense)

IE has a bug which rears its head occasionally, whereby you can't select a block of text in the middle of a page. Instead, selecting anything will select everything from the start of the page to the cursor position, however I don't know under what circumstances this appears.


Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I found this questions asking how to do this in many different forums, so I will describe here how to implement a solution using PHP and AJAX. The logical flow for the problem should be: Write an event handler for the first drop down box to get …
JavaScript has plenty of pieces of code people often just copy/paste from somewhere but never quite fully understand. Self-Executing functions are just one good example that I'll try to demystify here.
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …
Suggested Courses

831 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question