What is wrong in my jquery? I would like to make my div bigger depending on screen size and there is plenty of good examples, but still no success.
.picLeft {
border: 4px solid black;
border-radius: 15px;
width: 130px !important;-------> I need to change this
height: 130px;-------> I need to change this
text-align: center;
background-color: white;
margin: 10px !important;
padding: 0px;
float: left;
}
**EDIT TWO DIVS LIKE THAT**
var height = window.innerHeight;
var width = window.innerWidth;
console.log("height------->" +height);
console.log("width-------->" +width);
// <div class="ui-block-a picLeft" id="leftDiv">
//$("#leftDiv").css("width","300 !important"); NOT working
$(".picLeft").css("width","300 !important"); //NOT Working
<div class="ui-grid-a" style="background-color:black">
<div class="ui-block-a picLeft" id="leftDiv">
<img src="images/nk100x100.jpg" data-theme="c"
id="pictureId" />
</div>
<div class="ui-block-b picRight">
<img src="images/th100x100.jpg" data-theme="c" id="pictureId2" />
</div>
</div>
Thank you!
Sami
You can use an expression in your css file something like the example below too:
Thought it might be useful. You can also do conditional ones like this too:
I know this isn’t what you asked but others have already given good examples; this is just an alternative.