How to make pull right display properly?
Tags: css,angularjs,twitter-bootstrap,pug
Problem :
This is my current code
.tag-container.bottom-border.col-middle
h1.text-center {{ tag.name }}
button.btn.btn-follow.pull-right(ng-hide="hasFollowed" ng-click="tagArticles.followTag()") Follow
I want to make the tag.name in the middle, and the button in the right, but it didn't display correctly. How should I structure these two part? What css should I use?
Thanks.
Update
This is the simplified code about basic html
<row>
<div>
<h1> Tag name</h1>
</div>
<div class="pull-right">
<button>Follow</button>
</div>
</row>
Feel free to work on it. Thanks
Solution :
If you want to stick to pure bootstrap styles, something like this would work:
<div class="row">
<div class="col-md-10 col-md-offset-1">
<h1 class="text-center">Tag name</h1>
</div>
<div class="col-md-1 text-center">
<button class="btn btn-follow " style="margin-top: 1.5em;">Follow</button>
</div>
</div>
You'll need some extra styling to vertically center the button (to replace the inline style adding 1.5em margin to the top).
Also that styling centers the button below the h1 in mobile breakpoints ... that may or may not be what you're after.
CSS Howto..
You can use the below CSS property to re-scale an image although as stated above, this won't do your loading times any favours and a server side script would be...
If you change the display: inline; to float: left; then you will achieve your desired effect. You will need to add the image height to your header div to allow...
Besides CSS style, the problem you have is you've added a row class surrounding every post. Say you want to display three posts in each row, do it like this:...
Use @media queries. They serve this exact purpose. Here's an example how they work: @media (max-width: 800px) { /* CSS that should be displayed if width is equal to or...
How about this Fiddle #container{ background:green; width:300px; height:300px; overflow:hidden; } .img{ -webkit-animation:up 20s infinite; } .img{ height:300px; } @-webkit-keyframes up{ 0%{transform:translate(0,0)} 20%{transform:translate(0,-300px)} 40%{transform:translate(0,-600px)} 60%{transform:translate(0,-900px)}...
If you want to override style in any case irrespective of which order style is applied, consider applying style inline in the div. <div class="someClass" myAttributeDirective style="position:absolute;"></div> ...
Just remove the justify-content style. Elements that won't fit on the first row, will break to the second, starting on the left side. To make the code more fancy i've...
Usually I use footer.php to add JS and PHP code, just before the closing tag of the body. But if that does not work try using header.php. Maybe your code...
You can set bold on first level <ol>, and reset it on the second level <ol>s. .container ol { font-weight: bold; } .container ol ol { font-weight: normal; } <div...
You can use {{ and }} inside of <style>: <style> .p { background-color: {{name}}; } </style> Try: http://plnkr.co/edit/MMgRJP0fFCowE1rxcULM?p=preview...
Make the line-height of the div the same as the height of the div, eg: #UploadSuccess { height: 20px; line-height: 20px; } This will only work if you have one...
Solution: Include in the ko.bindingHandler the tinymce option content_css : "/my-local-path/mycontent.css" Add the file "/my-local-path/mycontent.css" to your solution I post my bindingHandler just in case other needs to see an...
You have to apply the inline style to all of the divs you want on the same line. Spans might be better suited to your purpose since that's what divs...
One solution is to remove default outline on focus using: div input:focus{ outline: none; } div input { border: 2px solid #a1a1a1; padding: 10px 40px; background: #dddddd; width: 300px; border-radius:...
Hey thanks all for all of your answers but finally I got the solution. It was damn easy... My markup was like this <div class="styled-offer"> <select style="font-size:13px;" class="select offer-select" name="type">...
This is how you can do it. $(document).ready(function(){ $(window).scroll(function(){ if($(window).scrollTop()>100) $(".nav").css({"background-color" : "rgba(0,0,0,.5)"}); else $(".nav").css({"background-color" : "rgba(0,0,0,1)"}); }); }); Use CSS to see it back on hover .nav:hover { background-color:rgba(0,0,0,1);...
$('.LocationName').each(function(index){ $(this).css("background-image", "url('/Style Library/Images/design/icons/greymarker" + index + ".png')"); }); ...
you can use http://www.dynamicdrive.com/style/csslibrary/category/C5/ CSS3 Box Shadows ("box-shadow" property)....
You could try something like this : h2, .examples { float:left; margin: 10px; display:block; } You can see it here http://jsfiddle.net/Phenix/Mwtdb/...
Use preg_replace_callback: $str = preg_replace_callback('/:\s*(\d+)px/', function($m) { return ': '.($m[1]/2).'px'; }, $str); ...
You may want to use inline-block instead of float: table.table_on_the_left, table.table_on_the_right { display:inline-block; } And to make the horizontal align text-align:center on the parent: body { text-align:center; } Check this...
The bean cannot be view scoped for that. The CSS file is requested during a completely separate GET request initiated by the webbrowser when it's being instructed to download the...
At first it seemed from the responses that using the show/hide functions would not be possible if I wanted a value of display other than block. However, I then noticed...
Firstly, you create approporiate viewport div: <div class="ui-icon alert-icon"></div> Then you define CSS: .ui-icon { width:16px; height:16px; overflow:hidden; background:url(images/icons.png); } .alert-icon { background-position:0 0; } .warrning-icon { background-position:0 -16px; }...
There's nothing wrong with this code, but keep in mind you're setting scale and rotate in absolute terms, not relative to its 'initial' state. So each time this code executes,...
Is your css file correctly linked in the .html? I understand it as you have your img as a background-image in css? <link rel="stylesheet" href="yourCss.css"> It's a long shot, but...
It seems that the most likely explanation is that you are not including the items.js file in your layout or application.js if you're using the asset pipeline. In development mode,...
Try the following: Isolate .user from the .col-x-x containers. The col containers should be used for layout only. Styling the .user element is overriding the BS3 layout styles. Remove any...
Use last child selector on .row and set the background-color: white; to it's child .article-container. Check below is an example. div.article-container { background-color: red; } .row:last-child .article-container { /* Change...
you can just add the following styles: .document-item { margin-bottom:8px; width:50%; float:left; } Example Also note this few improvements: .number { display: inline-block; border: 1px solid #0084c9; border-radius: 50%; color:...