Questions tagged [offsetwidth]

52 questions
0
votes
1 answer

What's the workaround when Firefox 4 reports inconsistent offsetWidth for table cells

I have a Gantt chart type web control: an html table of cells (one cell represents one day for example) and some absolutely positioned divs representing the bars - the parent element of the div is the appropriate start TD. I set the width of the…
Tom Carter
  • 2,938
  • 1
  • 27
  • 42
0
votes
1 answer

How to take immediate / offset bits for C.LD compressed instruction in RISC-V?

As shown in the reference pic [1] for RISC-V compressed instruction, immediate bit for C.LD instruction is shown in 2 different places - bit [12:10] and [4:2]. It is also shown that offset[5:3] and offset [7:6] is marked in imm field - [12:10] and…
sang 625
  • 3
  • 2
0
votes
2 answers

How to apply conditional column offsets in IONIC 3

I am using the ionic 3 and i have created grids. And Now i want to apply conditions on columns offset for this i have applied this code given below, but i got the error.
0
votes
0 answers

Calculate scrollbar width using LESS?

I'm working on a data table with a scrollable body and sortable, static headers, and when the vertical scrollbar appears, it messes with the right alignment between the header tags and the td tags below it. Without questioning the HTML behind the…
ryan
  • 89
  • 10
0
votes
0 answers

Why do I get difference in offsetheight and offsetwidth values when I emulate my web application from IE5 to IE7 or higher?

I want to make all the web pages in my web application to be compatible with the latest IE=Edge. Hence, I emulated my application using the IE developers tool and faced with a lot of broken CSS. I understand this is common when we move a web page…
Jerin Nishok
  • 13
  • 1
  • 6
0
votes
1 answer

Trying to get width of element inside .each()

I am trying to get the width of an element whilst inside a .each() function however I am running into issues with it simply not working. jQuery(document).ready(function($) { $('.tooltip').each(function() { var self = $(this); …
Daniel Vickers
  • 1,054
  • 1
  • 12
  • 32
0
votes
1 answer

D3 cannot read property offsetHeight of null

I get this cannot read property 'offsetHeight' of null while i just initialized its height. Here is my code: d3.select("#container") .style("height", "100%") .style("width", "100%") .style("position", "relative") .style("bottom",…
Robin van Hoorn
  • 334
  • 1
  • 10
0
votes
0 answers

offsetwidth for Chrome returns different values

code to get inner.offsetWidth the result for me is 2, but some people got 1. Even when we have the same Chrome version. In IE, it returns 1. btw, my result is offsetWidth: 2 version: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36…
shrimp rice
  • 321
  • 4
  • 22
0
votes
1 answer

offsetWidth vs scrollWidth: should be different, but the same

I have looked at: Understanding offsetWidth, clientWidth, scrollWidth and -Height, respectively But it is not the case. For example, .main { width: 400px; overflow: visible; } .main table { width: 600px; }
Dave
  • 759
  • 2
  • 9
  • 31
0
votes
1 answer

Offsetwidth by a new HTML Document

I want to create a new html document with javascript. There in the body i want create a div (display: inline) and in there a p tag. Then i put in the p tag (innerHTML) a String (titleTagString). Now i want know, which is offsetwidth the div has. The…
0
votes
3 answers

Safari is returning the wrong width value

Hi I have a table with a div in it the table has 2 columns and both are 50% In most browsers I can use offsetWidth to get the width of the article. But in Safari the width is less or more than what it should be. Any help would be greatly…
Richard Housham
  • 864
  • 2
  • 15
  • 34
0
votes
0 answers

Strange Progress Bar Behavior offsetwidth

I started developing a simple progress bar using vanilla JavaScript. As far as grabbing a width set in CSS the only way I found with JS is to use .offsetWidth - The following is the code for the functionality demo I was beginning to setup. The…
zfrisch
  • 8,474
  • 1
  • 22
  • 34
0
votes
1 answer

Galaxy Note 2 Screen Size

I recently ran into an issue with a media query for the Samsung Galaxy Note 2. The spec says it is 720x1280 with a pixel ration of 2. I have a div with a width of 100% and the .offsetWidth comes back as 541. Can Anyone explain this? Thanks, David
dlewis22
  • 111
  • 1
  • 1
  • 5
0
votes
1 answer

offsetWidth returns wrong width in css animated block under Chrome

I'm trying to make a kind of "news bar" on a web page. The bar use a CSS animation, and the text content is refreshed on each iteration using ajax to retrieve data from an RSS feed. My problem is that the content length may vary, so I want to set…
user2223898
  • 441
  • 1
  • 3
  • 15
0
votes
2 answers

Get width of specific div and use as another div's height?

I have two div's. #divA & #divB. #divA has a width of 100% and I want to get the px value of the div and apply it to #divB as it's height CSS. I've tried using .offsetWidth but to no avail. Can anybody help me?
50dollanote
  • 189
  • 4
  • 4
  • 12