Take the 2-minute tour ×

I want to add a value from a custom user attribute to the header of the cards in the default cardboard Kanban app. I added the following to the render function :


            var idDiv = document.createElement("div");
            dojo.addClass(idDiv, "leftCardHeader");
          // MY NEW CODE  
            if(item.Domain && item.Domain.length > 0) {
                var domainDiv = document.createElement("div");
                " Domain: " + item.Domain));
          // END MY NEW CODE
            var ownerImg = document.createElement("img");
            dojo.addClass(ownerImg, "cardOwner");

            var ownerName = document.createElement("div");
            dojo.addClass(ownerName, "cardOwnerName");



This adds the text value to the card header but in doing so it pushes the owner name and image down a row in alignment. I have looked at the CSS but don't see any formating that is sting length dependent but I am still relatively new to this area. I tried changing the font size in the CSS but that didn't change anything adding the above code always pushes the owner name and owner image down a line. Any help on what I might be doing wrong or if there is a cleaner way to dothis is appreciated.

share|improve this question
add comment

1 Answer

up vote 3 down vote accepted

You are appending a div, which is a block element- that is why you are getting the new line. You could either add a style of float:left to this element so it lines up next to the id or you could put the div in the card body instead- you may find it looks better there (especially on narrow width cards).

share|improve this answer
Thanks, I turned it to a span instead of a div and turned off the avatar in CSS for more room. The one oddity is I decided to make the domain attribute align far right. This put the Owner name field immediately preceding it. I am trying to find a way to make the owner name center in header. CSS changes don't appear to affect it. I switched it to a span and then it moved left immediately after user ID. Yet still CSS doesnt seem to move it center. Suggestions? –  Dax Jan 25 '12 at 0:45
add comment

Your Answer


