Cursor stays on left of text box - html

I'm trying to tweak a widget that loads from Javascript. I'm using jQuery to re-style it.
It has a textbox that is behaving strangely. The cursor stays on the left side of the box and as the user types the text flows to the right. Clicking in the text makes the cursor behave normally.
Does anybody know what might be causing this? I've tried changing the "direction" property but it doesn't help.
Thanks

i think your css having text-align:right
try this
text-align:left !important

Related

How to prevent seeing overflow when highlighting text?

In the image below, my code is on the left and my output is on the right. In the div, I allowed for y-overflow only, and set x-overflow to hidden, and replaced x-overflow with elipses. As you can see, I was able to achieve this result in the output box.
However, If I click in the output box div and highlight the text say the "dddd..." part, and drag to the right, I can see all this empty space to the right of the elipses. That is, I can highlight text and drag, to see the white-space overflow in the div. Is there a way to prevent this from occuring?
The reason I can "highlight" the text within the box and "drag" it to the right to see the "x-overflow" is because I was using the browser google chrome. For some reason when I use the browser "firefox" the problem disappears.
(If anyone can suggest how to fix the problem in chrome please post an answer.)

Input form padding doesnt work in IE

I am trying to add padding-right to an input so that I can place an image in that corner and not have the text flow behind it. It works fine in Chrome & Firefox but not in IE.
I have seen people recommend using float:left; but still it doesnt work.
See the problem here: http://jsfiddle.net/4zRRt/
That is not how you want to do that (probably, I am guessing, the button image doesn't work for me obviously).
I am guessing you want an input with a nice submit button which is always on the right.
This is done with a parent relative element and the button who is absolute with a right offset of 10px (to accomedate for the extra space the shadow requires). And a top set to 0...
Here is a jsfiddle of that:
http://jsfiddle.net/sg3s/4zRRt/10/
I put some extra display:block; in there to make the inputs block instead of inline, this will prevent other rendering problems too.

Select box is unclickable when using the "position:absolute" style

I created a select box using HTML and styled it using css:
#footer {
padding-bottom:60px;
position:absolute;
}
This disables the select box and makes it unclickable. But if I remove the "position:absolute" the select box works fine but it screws up my positioning. Does anyone have a solution for this?
EDIT: it works find when position:relative is used, but it's unclickable when position is fixed or absolute. I used for the HTML part.
These kind of issues almost always result from another element overlapping the textbox. To resolve the problem I usually use the inspector tool in firebug. When you click the text box it will select the invisible element instead which will give you a much better picture of what is happening.
That being said the usual fix is setting a higher z index as Simon pointed out.
It's difficult without knowing what other code may be effecting it. Try setting the z-index to high, or give us an example of the html aswell.
You've got something else wrong if the select is unclickable.
See this JS Fiddle: http://jsfiddle.net/SFUkR/1/
Absolutely positioning a select (or its parent container) does not make it disabled by default.

How can I control a dropdown's visible text's position?

I have a dropdown that I'm looking to enlarge without effecting the text and ensuring the right hand down arrow remains at the full hieght of the element.
I've tried adding padding but this effects the right side:
Dropdown with padding http://hoctordesign.com/dropdown2.png
I've tired adding height but I can't vertically align the text:
Dropdown with height http://hoctordesign.com/dropdown.png
Anyone solved this before?
Thanks,
Denis
This is browser-dependent behaviour. Each browser applies css to form controls differently.
The best breakdown of what you can do (that I've come across) is at http://www.456bereastreet.com/archive/200701/styling_form_controls_with_css_revisited/. And the most relevant section is http://www.456bereastreet.com/lab/styling-form-controls-revisited/select-single/
In your case it would be better to use a custom element that acts like a select box.
Here is a nice one using jQuery
Select Box replacement

Custom Dropdown and Combo Box problem?

I have a form.In that iam having my customized data dropdown.In one case combo box is below the custom data dropdown.when i click the dropdown th div iam caling has to come top of the combo box.It is not coming on the top the stack.the combo box and div are overlapping.
Any Suggestions to solve these problem?
Thanks
Avinash
This is because controls like select boxes, iframes will be on top of other controls like div, span etc.
You can either hide the select box when the custom control is on top of it. This won't be a great idea.
Otherwise you can use another iframe to solve this issue.
This is an IE-specific problem (fixed for IE8 I believe). The select element will always appear on top of anything else.
One solution is to create an iframe and position that underneath your dropdown. They are one of the few elements that will appear on top of the select element. http://www.clientcide.com/wiki/cnet-libraries/02-browser/02-iframeshim might be helpful.