manix Posted September 18, 2011 Share Posted September 18, 2011 Heya.. So what I need to do is I have a certain div with like 700px width unknown px height and unknown position (auto generated) and I need to place a textarea over that div with the same exact width height and position, how do I do that ? I tried $(the div).attr('width') and height but it didn't rly work out :/ Quote Link to comment https://forums.phpfreaks.com/topic/247370-getting-divs-parameters/ Share on other sites More sharing options...
RichardRotterdam Posted September 18, 2011 Share Posted September 18, 2011 This seems to indicate your using jquery is that true? $(the div).attr('width') And are you litterly using the div as selector or are you just using that as an example? Another question which puzzles me is why would you want to have a textarea that is larger over a div element? I have my doubts if that might be a good idea, can you perhaps elaborate why you would want this? Quote Link to comment https://forums.phpfreaks.com/topic/247370-getting-divs-parameters/#findComment-1270389 Share on other sites More sharing options...
manix Posted September 18, 2011 Author Share Posted September 18, 2011 I managed, after taking a look at jquery api, erm I needed that because I'm creating an edit option to my site where users/admins can edit posts, meaning that the post is the div and when you click the edit button the textarea appears on top of it containing the text ^^ here're the functions if someone needs them: $(selector).position().left $(selector).position().top $(selector).width() $(selector).height() Quote Link to comment https://forums.phpfreaks.com/topic/247370-getting-divs-parameters/#findComment-1270402 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.