How to achieve the following design in css in jquery mobile
Tags: css
Problem :
![I want to achieve the following red circle through css. I am using jquery mobile with angular js.My code is as below.
<div data-role="page" id="p2">
<div class="ui-bar ui-bar-d "data-role="header" >
<a href="" data-role="button" class="ui-btn-left">Chat</a>
<h1> contacts </h1>
<a href="" class="ui-btn-right">Photos</a>
</div >
<div data-role="content" data-position="center">
<div ng-controller="TalkCtl">
<ul >
Search:
<input type="search" ng-model="searchText">
<li ng-repeat="talk in talks | filter:searchText">
{{talk.name}} </br> {{talk.text}}
</li>
</ul>
</div>
</div>
Solution :
This can be easily done using css background-image
property, coupled with positioning and z-indexing.
CSS Howto..
You need an = in your div: <div class="body_wrapper"> ...
How to limit a to only three lines?
Assuming you are using jQuery, you could find all td elements that exceed a certain number of lines using: $('td').filter(function(){ return $(this).innerHeight() / $(this).css('line-height').slice(0,-2) > 3; //more than 3 lines...
This works, although it's extra markup. <div id="box_that_wants_a_gradient"> <div class="gradient_background_1"></div> <div class="gradient_background_2"></div> My content </div> There is a bonus to this tactic, as you can add multiple gradient boxes and...
Here: the power of media queries: @media only screen and (min-width: 960px) and (max-width: 1079px) { } @media only screen and (min-width: 768px) and (max-width: 959px) { } @media only...
Have a wrapper that is fixed, and just have the other 2 divs flow traditionally. #header-container { position:fixed height:15%; width:100%; background-color:blue; } #header, #dropdown { width:100%; } <div id="header-container"> <div...
Try this - http://jsfiddle.net/vn6Wx/ #inner { background:white; height:40%; width:200%; position: relative; left:-50%; top: 25%; margin-top:auto; margin-buttom:auto; vertical-align:middle; } ...
When you attach a function to an event, you don't really need to track the id of the element emitting the event, you just need to use the 'this' keyword...
According to Kendo UI QRCode documentation, to set the size of the QR code, you need to use the parameter size in pixels. Like this: $("#qrcode").kendoQRCode({ value: "#test", size: 300...
Code directly scraped from their page. Its CSS3 and no javascript involved. .mw-ui-input { -webkit-appearance: none; border: 1px solid #CCC; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; width: 100%; padding: .3em...
here you go: http://jsfiddle.net/9DTcT/2/ .ui-icon { display: inline-block; } hope this is what you're looking for...
$(document).ready(function() { $('#btn').on('click', function(){ var loadTime = 500; $('.class1, .class2, .class3, .class4').each(function (fadeInDiv) { $(this).fadeOut(loadTime, function(){ $(this).css('background-image', 'url("https://assets.servedby-buysellads.com/p/manage/asset/id/15119")'); }).data('delay',...
You need to use a media query in your style sheet for specific screen resolutions say for example @media all and (max-width: 1200px) and (min-width: 520px) { body { /*...
Thanks to @BhojendraSah for his answer. It's, to me, is saying: sorry, it's not possible - as what already said by @dsfq in the comment: With this HTML structure it's...
There is most definitely a simple css/html solution to this. You shouldn't need to hardcode the style with php or do math or use javascript: http://jsfiddle.net/Madmartigan/34UCn/5/ This may not be...
Give the container (td) position: relative and the image, or more specifically the <p> which contains the image, position: absolute; bottom: 0;. See it in action here.
Following is a sample (Note that Samples are not complete answers and so my answer is) ,see this, Learn CSS basics The following code will give you the result you...
use the background cover just look at this http://css-tricks.com/perfect-full-page-background-image/...
Use quotes around the value. In this case "list[]". EXAMPLE HERE [for="list[]"]{ color:red; } For more information, check out the documentation on attribute selectors....
Simply NO, Cascading does not works like that way. You can't select parent in CSS. But yes you can do this by using sass/scss. But it will not work as...
Open switchery.js and replace jack.offsetWidth by 30 in Switchery.prototype.setPosition function. This worked for me. ...
Assuming it's marked up inside of the content <div>, you just need to pass float: right; to it, and it should do the trick. The code I used in This...
You can filter the set of parents(), and grab the first element matching your filter: $('#my-element') .parents() .filter(function() { return $(this).css('position') == 'relative'; }).first(); Demo (Works with classes, too)...
You cant use all types of fonts. User need to have font in his machine or you have to use thirdparty font library like Google web fonts. For the available...
You can use &:extend(.table > thead > tr > td.warning); inside your own class to inherit from that Element: View the CSS output on LESS Playground .table > thead >...
Your positioning is wrong, a fiddle would be helpful but just did this using firebug, give margin: -40px 0 0; to #searchbar, you can do it better with positioning but...
I think you'll find this grunt plugin to be exactly what you need; grunt image embed. Works for both images and fonts. From the docs: grunt.initConfig({ imageEmbed: { dist: {...
You have to apply the corresponding CSS class: <div class="ui-icon ui-icon-plus"></div> Assuming that you have the correct jQuery UI .css file with those classes defined. If you look at the...
You won't, and shouldn't, use !important. You just need to properly override following the principles of CSS specificity and inheritance. Explanation of CSS Inheritance For example--let's say your 'unwanted' button...
You will need to adjust the styles for check-rates_btn and titleimg accordingly using CSS Media Queries. Unfortunately, you are using Drupal and have too many cached CSS files for me...
Modernizr does not include the box sizing test in their default build. It's one of their core extras. Check out this: How to use Modernizr classes? I think it has...
Assuming you are using jQuery, you could find all td elements that exceed a certain number of lines using: $('td').filter(function(){ return $(this).innerHeight() / $(this).css('line-height').slice(0,-2) > 3; //more than 3 lines...
This works, although it's extra markup. <div id="box_that_wants_a_gradient"> <div class="gradient_background_1"></div> <div class="gradient_background_2"></div> My content </div> There is a bonus to this tactic, as you can add multiple gradient boxes and...
Here: the power of media queries: @media only screen and (min-width: 960px) and (max-width: 1079px) { } @media only screen and (min-width: 768px) and (max-width: 959px) { } @media only...
Have a wrapper that is fixed, and just have the other 2 divs flow traditionally. #header-container { position:fixed height:15%; width:100%; background-color:blue; } #header, #dropdown { width:100%; } <div id="header-container"> <div...
Try this - http://jsfiddle.net/vn6Wx/ #inner { background:white; height:40%; width:200%; position: relative; left:-50%; top: 25%; margin-top:auto; margin-buttom:auto; vertical-align:middle; } ...
When you attach a function to an event, you don't really need to track the id of the element emitting the event, you just need to use the 'this' keyword...
According to Kendo UI QRCode documentation, to set the size of the QR code, you need to use the parameter size in pixels. Like this: $("#qrcode").kendoQRCode({ value: "#test", size: 300...
Code directly scraped from their page. Its CSS3 and no javascript involved. .mw-ui-input { -webkit-appearance: none; border: 1px solid #CCC; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; width: 100%; padding: .3em...
here you go: http://jsfiddle.net/9DTcT/2/ .ui-icon { display: inline-block; } hope this is what you're looking for...
$(document).ready(function() { $('#btn').on('click', function(){ var loadTime = 500; $('.class1, .class2, .class3, .class4').each(function (fadeInDiv) { $(this).fadeOut(loadTime, function(){ $(this).css('background-image', 'url("https://assets.servedby-buysellads.com/p/manage/asset/id/15119")'); }).data('delay',...
You need to use a media query in your style sheet for specific screen resolutions say for example @media all and (max-width: 1200px) and (min-width: 520px) { body { /*...
Thanks to @BhojendraSah for his answer. It's, to me, is saying: sorry, it's not possible - as what already said by @dsfq in the comment: With this HTML structure it's...
There is most definitely a simple css/html solution to this. You shouldn't need to hardcode the style with php or do math or use javascript: http://jsfiddle.net/Madmartigan/34UCn/5/ This may not be...
Give the container (td) position: relative and the image, or more specifically the <p> which contains the image, position: absolute; bottom: 0;. See it in action here.
Following is a sample (Note that Samples are not complete answers and so my answer is) ,see this, Learn CSS basics The following code will give you the result you...
use the background cover just look at this http://css-tricks.com/perfect-full-page-background-image/...
Use quotes around the value. In this case "list[]". EXAMPLE HERE [for="list[]"]{ color:red; } For more information, check out the documentation on attribute selectors....
Simply NO, Cascading does not works like that way. You can't select parent in CSS. But yes you can do this by using sass/scss. But it will not work as...
Open switchery.js and replace jack.offsetWidth by 30 in Switchery.prototype.setPosition function. This worked for me. ...
Assuming it's marked up inside of the content <div>, you just need to pass float: right; to it, and it should do the trick. The code I used in This...
You can filter the set of parents(), and grab the first element matching your filter: $('#my-element') .parents() .filter(function() { return $(this).css('position') == 'relative'; }).first(); Demo (Works with classes, too)...
You cant use all types of fonts. User need to have font in his machine or you have to use thirdparty font library like Google web fonts. For the available...
You can use &:extend(.table > thead > tr > td.warning); inside your own class to inherit from that Element: View the CSS output on LESS Playground .table > thead >...
Your positioning is wrong, a fiddle would be helpful but just did this using firebug, give margin: -40px 0 0; to #searchbar, you can do it better with positioning but...
I think you'll find this grunt plugin to be exactly what you need; grunt image embed. Works for both images and fonts. From the docs: grunt.initConfig({ imageEmbed: { dist: {...
You have to apply the corresponding CSS class: <div class="ui-icon ui-icon-plus"></div> Assuming that you have the correct jQuery UI .css file with those classes defined. If you look at the...
You won't, and shouldn't, use !important. You just need to properly override following the principles of CSS specificity and inheritance. Explanation of CSS Inheritance For example--let's say your 'unwanted' button...
You will need to adjust the styles for check-rates_btn and titleimg accordingly using CSS Media Queries. Unfortunately, you are using Drupal and have too many cached CSS files for me...
Modernizr does not include the box sizing test in their default build. It's one of their core extras. Check out this: How to use Modernizr classes? I think it has...