Solved

Formating drop down in MVC

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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

Introduction Hi all and welcome to my first article on Experts Exchange. A while ago, someone asked me if i could do some tutorials on object oriented programming. I decided to do them on C#. Now you may ask me, why's that? Well, one of the re…
This article aims to explain the working of CircularLogArchiver. This tool was designed to solve the buildup of log file in cases where systems do not support circular logging or where circular logging is not enabled
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.

770 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