dsaba Posted June 21, 2008 Share Posted June 21, 2008 Hi, I asked about trying to get approximate pixels for width & height of a single font character across browsers. I got a reply about how identifying such a thing is impossible... This is the background "big goal" of my current question, which is an idea on how to measure this pixel width & height of a text character. Can you place things inside of a "stretchy" container(div) and then obtain the width & height of this stretchy container which will stretch to hold the contents (some text, some graphics.. whatever..). If this is possible (and you understood my explanation ), can you show me some CSS/HTML code to do this? The idea is the parent element container will be bigger than it was before because of the addition of a child element inside of it that causes it to expand. This expansion should be snug exactly to the child element as well. Therefore, by measuring the dimensions of the newly stretched parent element, you can know the dimensions of its child element. -thanks ___________ Quote Link to comment Share on other sites More sharing options...
haku Posted June 21, 2008 Share Posted June 21, 2008 I'm not too sure exactly what you are trying to ask, but I can say this much - neither CSS nor HTML are programming languages. As such, they don't return values. They just take in code and display it, they aren't dynamic. So I think that whatever it is you are trying to ask, it can't be done. Quote Link to comment Share on other sites More sharing options...
TheFilmGod Posted June 22, 2008 Share Posted June 22, 2008 javascript maybe. This is some very complicated stuff man. I encourage you to not worry about it. Quote Link to comment 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.