Doc Type Declaration and Strange Text Selection

liunx

Guest
PROBLEM: <br />
If I: <br />
(1) use the w3.org's Document Type Declaration, and <br />
(2) use CSS's absolute position attribute to put the main text into place (beneath my navigation bar), <br />
<br />
then a strange thing happens.<br />
<br />
At least in my browser (Microsoft Internet Explorer 6, Windows XP) I cannot highlight individual words on my page. That is, if I click and drag over the text, even only slightly, then all of the text up and to the left is instantly selected.<br />
<br />
This problem goes away if I either <br />
(1) remove the Document Type Declaration, or <br />
(2) use only tables to keep text in its place, not the CSS position attribute.<br />
<br />
Here is my site: <!-- m --><a class="postlink" href="http://www.banksvideo.com/">http://www.banksvideo.com/</a><!-- m --><br />
<br />
I think it occurs on every page of the site.<!--content-->I'm using IE5.2 on a Mac and I run into almost the same difficulties. I can highlight individual words if I double-click on them. Highlighting one or two words in a sentence doesn't work, and getting just one paragraph is tricky.<br />
<br />
I'm not an expert on CSS, but the problem might have something to do with the way you've written your code. I've noticed that you're not consistent in your spacing. Sometimes you write "element:attribute;" sometimes it's "element : attribute ;" and just about every possible combination in between. That could be confusing the browser enough to throw off the highlighting, but not enough to warrant an error on the page.<br />
<br />
The other thing it could be is the 'absolute positioning' you have. I'm not saying that you shouldn't position things like that, but it could be that what's being highlighted isn't quite in the same position on the page as it appears in the browser. I noticed when I highlighted one section, I was halfway up the top image before the top paragraph highlighted fully. <br />
<br />
Does that almost make sense to you?<br />
<br />
Peg<!--content-->Originally posted by Pegasus <br />
the problem might have something to do with the way you've written your code. I've noticed that you're not consistent in your spacing.<br />
<br />
w3.org says that "white space" -- that is, returns and spaces -- is allowed. Past experiments show no change in the document whether the mark-up contains no space, or five spaces, around the code. Some professional web sites use white space liberally, to make the code easier to look at.<br />
<br />
I have a "Strict HTML 4.01" Document Type Declaration. Without it, the problem goes away. Could it be that, not the white space but something else must be more consistent? I have read that XHTML 1.0, the replacement for HTML 4, is stricter than HTML. That is, all attributes must be enclosed in quotes, all tags must be lower case, etc.<br />
<br />
You could check my Style Sheet. Perhaps I must put more attributes with the position attribute, such as "display," "height," "width," etc.<!--content-->Originally Posted by Ambient<br />
w3.org says that "white space" -- that is, returns and spaces -- is allowed. Past experiments show no change in the document whether the mark-up contains no space, or five spaces, around the code. Some professional web sites use white space liberally, to make the code easier to look at.<br />
<br />
There is no guarantee that the browser you are using is fully compliant with the standards laid down by w3.<br />
<br />
<br />
as far as your page code goes, I can't see anything wrong with it, and yet I do experience the problem.<br />
<br />
maybe absolute positioning, like Peg said<!--content-->also, as a slight security thing, I'd change the path to the stylesheet in the LINK. I realise it's not much of an improvement, but it makes it a little harder..<!--content-->there's no need to have the dtd in the doctype:<br />
<br />
"http://www.w3.org/TR/html4/strict.dtd"<br />
<br />
plus you have that dtd with a transitional doctype?<br />
<br />
on some pages you ahvent even got 'transitional', i can select individual words up the page fine, ie 5.5 + mozilla<!--content-->Originally posted by ambient <br />
w3.org says that "white space" -- that is, returns and spaces -- is allowed. Past experiments show no change in the document whether the mark-up contains no space, or five spaces, around the code. Some professional web sites use white space liberally, to make the code easier to look at.<br />
<br />
I have a "Strict HTML 4.01" Document Type Declaration. Without it, the problem goes away. Could it be that, not the white space but something else must be more consistent? I have read that XHTML 1.0, the replacement for HTML 4, is stricter than HTML. That is, all attributes must be enclosed in quotes, all tags must be lower case, etc. Unfortunately, what the W3 *says* and what browsers do aren't necessarily the same. I know if you have a return/space in a <td>, even when it's just that the closing tag is placed on another line, you'll sometimes get unwanted spaces in the table. <br />
<br />
Hmmm... whitespace and "strict" html. That could be the problem. With the strict limitation, the browser could be reading it as "function"<space>"attribute". If it's adding an extra pixel or two of whitespace for every space you have in the code, that would throw things off. It's almost as if my mouse is reading the text before the browser shows it on the screen, if that makes sense. Almost like a refracted image. Maybe try a "transitional" doctype for now? That might get you around the awkward spots so you can have a bit of a break to uncross your eyes.<br />
<br />
And I did notice one image that was seriously out of whack - or the text was. On your bio page, I can't read the text on the right side of the page because your image overlaps it. <br />
<br />
You know, you might need to remove some of the attributes, too. I'm not that good at parsing CSS, so I couldn't tell you if you had a style conflict or not. <br />
<br />
Try putting in a transitional doctype first. That might narrow the problem down. <sigh> It could be something as silly as forgetting punctuation somewhere down the line - a missing : or ; or something. Or having 2 : in one element/attribute combination. *g* I've done that often enough. Written "element: attribute:" instead of "element: attribute;". Or I've stuck 2 ; in.<br />
<br />
Let us know what happens. What fixes your glitch might just help me with one I've been having in something similar.<br />
<br />
Peg<!--content-->
 
Back
Top