User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the JavaScript / DHTML / AJAX section within the Web Development category of DaniWeb, a massive community of 401,691 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,773 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our JavaScript / DHTML / AJAX advertiser: Lunarpages Web Hosting
Views: 33864 | Replies: 12
Reply
Join Date: Aug 2007
Location: Slovakia
Posts: 2
Reputation: possitive is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
possitive's Avatar
possitive possitive is offline Offline
Newbie Poster

Re: Getting the height and width of content fitting DIV element.

  #11  
Aug 23rd, 2007
But what if the implicit CSS style value of the div is 'display:none'.. Do you thinkg there is any way to get the size of the div even the CSS style definition is 'display:none'.. ?
lubomir.herko(at)mac.com
Reply With Quote  
Join Date: Nov 2007
Posts: 1
Reputation: raoisrar is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
raoisrar raoisrar is offline Offline
Newbie Poster

Question Re: Getting the height and width of content fitting DIV element.

  #12  
Nov 1st, 2007
hello how are you?
i have same problem to getting div height.
if you have got solution plz tell me thanks
below it is problem.

Originally Posted by alpha_foobar View Post
Hey,
I'm having an issue getting the height and width of DIV elements that have resized themselves to fit their content.

Note: I do not have a problem getting the height and width of DIV elements that I have set using Javascript. The probel is that this value appears to stick. I.e. the height is set to 150px, then the content is changed and the DIV cosumes as much height as is required (clearly more than 150px), however analysing the DOM indicates that the height is the same (though it is clearly not).

I want to know how to get hold of the 'actual' size of a DIV element that is manipulated by the content of the DIV.

I am also interested in a solution that works in IE and Firefox (at least).

Cheers.
Reply With Quote  
Join Date: Jan 2007
Posts: 2,537
Reputation: MidiMagic is on a distinguished road 
Rep Power: 7
Solved Threads: 108
MidiMagic's Avatar
MidiMagic MidiMagic is offline Offline
Posting Maven

Re: Getting the height and width of content fitting DIV element.

  #13  
Nov 2nd, 2007
You can. Just set them to auto in the stylesheet. They are valid styles.
Daylight-saving time uses more gasoline
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb JavaScript / DHTML / AJAX Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Other Threads in the JavaScript / DHTML / AJAX Forum

All times are GMT -4. The time now is 7:58 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC