?
Solved

Formating drop down in MVC

Posted on 2014-11-06
2
Medium Priority
?
151 Views
Last Modified: 2014-11-10
I'm trying to format the following drop down in my MVC project with rounded edge. Please see screen shot.

I'm a little lost  on where to insert some css style and how to write it.

Drop Down...
That is my mvc code bellow:

  <div class="form-inline">
            @*Find by Last Name or First Name: @Html.TextBox("SearchString", ViewBag.CurrentFilter as String, new { style = "width:200px", @class = "form-control" })*@

            Department/Location: @Html.DropDownList("DeptList","All")
            @Html.TextBox("SearchString", ViewBag.CurrentFilter as String, new { style = "width:300px", @class = "form-control", placeholder = "Find by Last Name or First Name:" }) 

            <input type="submit" value="Search" class="btn btn-default" />
         
        </div>

Open in new window

0
Comment
Question by:yguyon28
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 75

Accepted Solution

by:
käµfm³d   👽 earned 2000 total points
ID: 40426224
Generally speaking, you wouldn't add style tags to your elements--you would add CSS rules to a stylesheet, and import that styleseet to the page (generally via a bundle). What look are you trying to achieve? Something similar to the textbox? If so, only a handful of the current browsers allow you to style a list/combo box. Usually IE is the offender, but perhaps the newest editions of IE let you. You may need to use an alternative form of listbox provided by JQuery or some other such library.
0
 

Author Comment

by:yguyon28
ID: 40426312
Yes something similar to the text box with rounded edge... I'm a lost on where to add the css and how to call it and what css to use.. Some help will be greatly appreciated....
0

Featured Post

Get free NFR key for Veeam Availability Suite 9.5

Veeam is happy to provide a free NFR license (1 year, 2 sockets) to all certified IT Pros. The license allows for the non-production use of Veeam Availability Suite v9.5 in your home lab, without any feature limitations. It works for both VMware and Hyper-V environments

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Many of us here at EE write code. Many of us write exceptional code; just as many of us write exception-prone code. As we all should know, exceptions are a mechanism for handling errors which are typically out of our control. From database errors, t…
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
Suggested Courses

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question