Linked Questions
13 questions linked to/from Setting DIV width and height in JavaScript
-1 votes
1 answer
102 views
How can I adjust a style attribute within a div? [duplicate]
Hello guys i was wondering how would I edit this using JavaScript DOM? <div class="player-column" style="width: 675.556px;"></div> I'd prefer a method using document.querySelector("....
2 votes
1 answer
5k views
element.style.width and element.style.height is not working
let a = document.createElement("div"); a.style.width = 400; a.style.height = 400; a.style.backgroundColor = "red"; // num : 1 a.innerText = "Hello World "; // num : 2 ...
0 votes
3 answers
3k views
Setting height relative to `window.innerHeight` not working
This might be a very stupid question for some people, but I surely am not able to understand the problem behind this. The code is fairly simple, and goes as follows: HTML: <!DOCTYPE html> <...
-3 votes
2 answers
4k views
Setting the height on an element dynamically, in Javascript [duplicate]
I am trying to set the height of an element dynamically, so that when the document first opens, the element takes up the whole screen (adjusted for other elements on the screen - not shown in the ...
1 vote
4 answers
4k views
Position an element always at the bottom of the page, below other elements
I am trying to position a <div> always below anything else on the page. The <div> is inserted using javascript and it is always the last element on the page before </body>. So far I ...
1 vote
1 answer
2k views
CreateJs Canvas resize Bitmap
I'm currently working with createJS canvas. I have an image with a predefined size into a Json file and boxes that are link to an eventListener on "mouseout" and "mouseover"). var stage = new ...
0 votes
2 answers
889 views
Changing Div Width via Javascript
I'm making a website for my art gallery. Part of what I need to do is display images to the viewers in a way in which they can view them. And I want to do this without reducing the quality of the ...
1 vote
3 answers
277 views
Javascript object css manipulation
just a basic question I have an object and I'm trying to get the css property out of it. So what I want is like this var width = e.style.width; I'm like 90% sure that width would become a string, ...
0 votes
4 answers
176 views
Applying a CSS rule using javascript [duplicate]
I have the following inside my custom css:- img[src*="webmail"],img[src*="portal"],img[src*="website"],img[src*="CRM"], img[src*="object"],img[src*="Emailar"],img[src*="Contact"] { width:70px; ...
0 votes
5 answers
199 views
Change CSS Property through JavaScript. (Uses ID's and Classes)
I'm trying to resize a panel using JavaScript to fit a small image into a panel, and struggling badly. It's within the bold: <body id="visCinemaTransRefund"><br> <div id="content">&...
1 vote
3 answers
95 views
Changing Height and Width of Div via Jquery
I'm trying to fill the div container with square boxes. Why doesn't this line work? I can't seem to change the height and width of my div #gridSquare. $('#gridSquare').css({"height": "38.4", "width": ...
2 votes
4 answers
190 views
Can we change the value of attribute css by js
Can we change the value of the attribute CSS class by javascript? I mean, I had to create <li class="Item">first</li> Where CSS class I have attribute height: 200; width: 200; ...
0 votes
3 answers
71 views
How do I resize something with jQuery and CSS
How do I change the size of a div when I push a button. I have it so far where when you push the button the side menu go away but how do I make the content one fill the rest of the container? Where ...