Code Monkey home page Code Monkey logo

Comments (2)

jseppi avatar jseppi commented on July 21, 2024

This is more of a CSS question than an issue with my module. You can certainly style dropdowns individually by just using CSS that targets the generated HTML from the directive.

For instance, you could target the dropdown pieces by giving specifying another class name, or by targeting based on parent container.

<!-- you can target via .aClass on this dropdown -->
<div class="aClass" dropdown-select="ddSelectOptions" dropdown-model="ddSelectSelected"></div>

<!-- you can target this dropdown via its parent -->
<div id="aParentContainer">
  <div dropdown-select="ddSelectOptions" dropdown-model="ddSelectSelected"></div>
</div>
.aClass.wrap-dd-select {
  background-color: green;
}

#aParentContainer .wrap-dd-select {
  background-color: purple;
}

from angular-dropdowns.

mLaird avatar mLaird commented on July 21, 2024

When I do the first approach .aClass .wrap-dd-menu , I get changes in the
button, but the dropdown menu does not change from that set in
angular-dropdowns/css/dropdowns.css for .wrap-dd-menu You set
width:200px; I changed it to width:80px; and for the second button
dropdown on the same page, I want it to be width:100px;

For this second button, I used a different class="btn-post" and my HTML is:

                <div id="postBox" class="floatingSection"

ng-controller="postButtonController">
Post Button

In my own external CSS style sheet, I have this CSS, but none of it takes
effect, i.e., background and width do not take effect

        .btn-post .wrap-dd-menu{
            /* Size and position */
            background:#eaaa32; /* apricot tan */
            position: relative;
            width: 100px; /* original clone 200px; 75px is OK */
            margin: 0 auto;
            padding: 10px;
        }

I've tried several things (including the above CSS in your dropdowns.css),
and it appears to me that the dropdown styling is set only once by this
line in the dropdownMenu directive

$wrap = angular.element("

");

As best I can tell, the button styling can be changed, but the dropdown
menu cannot.

On Mon, Jun 30, 2014 at 2:52 PM, James Seppi [email protected]
wrote:

This is more of a CSS question than an issue with my module. You can
certainly style dropdowns individually by just using CSS that targets the
generated HTML from the directive.

For instance, you could target the dropdown pieces by giving specifying
another class name, or by targeting based on parent container.

.aClass.wrap-dd-select {
background-color: green;}
#aParentContainer .wrap-dd-select {
background-color: purple;}


Reply to this email directly or view it on GitHub
#18 (comment)
.

Mike Laird

12 Arbor Creek Drive, Pittsford, New York 14534
[email protected]

". . . remembering on both sides that civility is not a sign of weakness,
and sincerity is always subject to proof. Let us never negotiate out of
fear, but let us never fear to negotiate." - John F. Kennedy

from angular-dropdowns.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.