Is there a way to adjust width of search widget in js api?

2659
6
Jump to solution
02-09-2016 02:04 AM
MichaelKefahuchi
New Contributor

Well, the question is already in the title.

The search widget is about 280px wide, and I just need to make it about 200px to fit to my tool bar.

0 Kudos
1 Solution

Accepted Solutions
AnthonyGiles
Frequent Contributor II

Michael,

Try using the following css:

.arcgisSearch .searchGroup .searchInput {

   width:100px;

  }

Regards

Anthony

View solution in original post

6 Replies
RichardMiedema1
Esri Contributor

Hi Michael,

Did is defined in the esri.css stylesheet (look inside it for.arcgisSearch .searchGroup .searchInput ). You could override it with your own css.

MichaelKefahuchi
New Contributor

Thank you Richard,

I have already played with that css selectors however without success. Here is jsfiddle if you wish to have a look:

search widget width - JSFiddle

My tries are commented out, so far nothing worked...

0 Kudos
AnthonyGiles
Frequent Contributor II

Michael,

Try using the following css:

.arcgisSearch .searchGroup .searchInput {

   width:100px;

  }

Regards

Anthony

View solution in original post

MichaelKefahuchi
New Contributor

Richard thank you very much. I just didn't realize that I have to use all three selectors, till I read Anthony's answer. So I am marking Anthony's answer as correct one, but it is just because it was more obvious to me. I wish I could mark both as correct.

Big THANK YOU to both of you.

0 Kudos
KenBuja
MVP Honored Contributor

You can also mark answers as being helpful in addition.

0 Kudos
MichaelKefahuchi
New Contributor

thanx for suggestion, I did that...

0 Kudos