Solved

Formating drop down in MVC

Posted on 2014-11-06
2
146 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 500 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

This document covers how to connect to SQL Server and browse its contents.  It is meant for those new to Visual Studio and/or working with Microsoft SQL Server.  It is not a guide to building SQL Server database connections in your code.  This is mo…
Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
Come and listen to Percona CEO Peter Zaitsev discuss what’s new in Percona open source software, including Percona Server for MySQL (https://www.percona.com/software/mysql-database/percona-server) and MongoDB (https://www.percona.com/software/mongo-…
In this video, viewers are given an introduction to using the Windows 10 Snipping Tool, how to quickly locate it when it's needed and also how make it always available with a single click of a mouse button, by pinning it to the Desktop Task Bar. Int…

690 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