0

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.

4
  • You have defined PairTextbox instead of PairTextBox, check: jsfiddle.net/up1f1wjx Commented 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 :) Commented Jan 19, 2015 at 20:16
  • you could make a div around the inputs and set the width to 100% jsfiddle.net/nxmc83re Commented Jan 19, 2015 at 20:19
  • Thanks for all the help I edited with another CSS question Commented Jan 19, 2015 at 20:28

3 Answers 3

1

You just forgot to write ID properly,

CSS

.teststyles input#PairTextbox {
    width: 80%;           ^---Typo here. IDs are case-sensitive. 
}

Look updated jsFiddle

Sign up to request clarification or add additional context in comments.

1 Comment

Thanks I missed that, helpful
1

You have a typo it's

.teststyles input#PairTextbox {
    width: 80%
}

because PairTextbox !== PairTextBox

LIVE DEMO

Comments

1

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

Thank you. Can you also help with the EDIT i made to the original question? @Wilfredo-P

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.