This is probably an easy fix but I can't figure it out. I am trying to style the textbox to be the same width as the listbox.
-
You have defined PairTextbox instead of PairTextBox, check: jsfiddle.net/up1f1wjxLeandro Carracedo– Leandro Carracedo2015-01-19 20:15:18 +00:00Commented Jan 19, 2015 at 20:15
-
Just a little tip - in HTML there is a difference between a textbox and a text input. The element in your example is a text input rather than a textbox :)rwacarter– rwacarter2015-01-19 20:16:24 +00:00Commented Jan 19, 2015 at 20:16
-
you could make a div around the inputs and set the width to 100% jsfiddle.net/nxmc83reBa5t14n– Ba5t14n2015-01-19 20:19:35 +00:00Commented Jan 19, 2015 at 20:19
-
Thanks for all the help I edited with another CSS questionnewuser456– newuser4562015-01-19 20:28:04 +00:00Commented Jan 19, 2015 at 20:28
Add a comment
|
3 Answers
You just forgot to write ID properly,
CSS
.teststyles input#PairTextbox {
width: 80%; ^---Typo here. IDs are case-sensitive.
}
Look updated jsFiddle
1 Comment
newuser456
Thanks I missed that, helpful
You have a typo it's
.teststyles input#PairTextbox {
width: 80%
}
because PairTextbox !== PairTextBox
Comments
you get your id name wrong in your css part.And instead of input ,you should add input[type='text'] as selector,otherwise it will effect all the input elements under the same class name.it will be
.teststyles input[type='text'] #PairTextbox {
width:80%;
}
Or you can add size attribute to your input text field.That will do .
<input id="PairTextbox" type="text" size='38'/>
for edit section:
just cut and paste the desired element and place it at the top of listItem box in your html.you should probably be able to do it by yourself .jsFiddle
1 Comment
newuser456
Thank you. Can you also help with the EDIT i made to the original question? @Wilfredo-P