Hey there, I have a rather strange problem on my website only occurring on Opera. Contact Green-Watch, LLC When the page first loads, the margin at the top of "reason for contact" disappears. If I type anything in the message text box, the margin above the email message disappears. This is the undesirable problem. I noticed that this javascript code is related to the problem: function charCheck(myLabel, myTxtArea, charCount) { var charsRemainingLabel = document.getElementById(myLabel); var myTextArea = document.getElementById(myTxtArea); var charsLeft = charCount - myTextArea.value.length; if (charsLeft < 0) { alert("You can only enter up to "+charCount+" characters for this text field."); myTextArea.value = myTextArea.value.substring(0, charCount); charsRemainingLabel.innerHTML = "0 characters remaining"; } else if (charsLeft == 1) { charsRemainingLabel.innerHTML = charsLeft + " character remaining"; } else { charsRemainingLabel.innerHTML = charsLeft + " characters remaining"; } } Code (markup): Just wondering why this is happening and how I can fix it? Thanks in advance for any suggestions. Sincerely, Travis Walters
Not fully tested, but it seems to work. Delete the clearfix DIVs, and make the LIs {overflow: hidden;}. Instead of clearing from below, as you've done, try causing the containers (li) to enclose their float children. cheers, gary
Gary's right about the clearfix nonsense - there's no real reason to use it when overflow:hidden and a haslayout trigger are all you need on the elements themselves. Other possible causes could be the endless/pointless comment placement, though that's more prone to causing IE layout issues... and the generally over thought-out markup. Easily two-thirds of the div's present are unnecessary, the use of deprecated tags like font along with paragraph tags on obvious heading elements, along with outdated/outmoded nonsense like clearfix, spacer.gif's, list abuse in the form, endless unnecessary DIV in the form, fixed heights on containers with dynamic fonts; use of an invalid image format for the favicon (so it only works in FF), the train-wreck of javascript for nothing - I can't say I'm really surprised by any layout issues. Though since it's slapped together with that steaming pile of manure known as Dreamweaver... let's just say it's another reason any problems are none-too-shocking. Explains why you end up resorting to that IE conditional bullcookies for anything less than IE8 while at the same time resorting to the EmulateIE7 crap when there is NOTHING in that layout which should warrant any of that. You're in "throw it out and start over with MODERN markup" territory... Hell, you don't even have anything on any of those pages that NEEDS javascript thrown at it except for a behavior file for IE6/earlier.
Hey there, Thanks for the feedback Gary and DeathShadow. If you are interested, I am looking for a good web designer to assist me in fixing some CSS issues around the site. There are a few small issues now that need fixing including the one in this article. I would like to pay on a job basis - not per hour. Basically, I would describe the problem I am seeing, the chosen programmer would give me a quote, and then I would give the go ahead. I am willing to work through rentacoder if the programmer insists. Otherwise, payments will be sent via PayPal. If the work is not done on rentacoder, the chosen programmer will have to sign an agreement stating the work is a work made for hire - meaning I would retain the rights to the code once it is paid for in full. If you are interested, please send a resume to and / or . I would like to see previous websites you have built. Programmers are also encouraged to give a list of items that they could possibly work on for Green Watch. I will review the list and add things to the coders todo list if I feel the change is acceptable. Possible changes I am seeing right now include CSS warnings in firefox and the problem mentioned in this article. The chosen programmer should be fluent in CSS and JavaScript. The programmer will have to use their own computer or server to fix the problems - I can not grant access to the Green Watch server because of another clients materials being there as well. If these small jobs go well, the coder may be selected in the future to design a Green Forum for the website. The selected coder may also get a link under the credits page to link their personal website or business website. Thanks again and talk to you soon. Sincerely, Travis Walters