www.webdeveloper.com
Results 1 to 5 of 5

Thread: Text Extent?

  1. #1
    Join Date
    Nov 2008
    Posts
    116

    Text Extent?

    Is there any way to retrieve the text extent? I'm placing links into div tags and want to set the width of the div directly, I know this might be an issue as a user could size the text them selves as well.

    Is there a way at all to do this?

  2. #2
    Join Date
    Dec 2003
    Location
    Bucharest, ROMANIA
    Posts
    15,428
    Not very clear to me... What don't you use SPAN instead of DIV?

  3. #3
    Join Date
    Nov 2008
    Posts
    116
    Not sure why I don't...

    What I need to be able to do is get he width and height of the div or span after it has been set so that I can align another div to them that will have a position of absolute.

    Will a span allow me to do that?

  4. #4
    Join Date
    Dec 2003
    Location
    Bucharest, ROMANIA
    Posts
    15,428
    Quote Originally Posted by pen View Post
    Not sure why I don't...

    What I need to be able to do is get he width and height of the div or span after it has been set so that I can align another div to them that will have a position of absolute.

    Will a span allow me to do that?
    No.

    Can you detail a little bit? Can you create a small example, or something like that?

  5. #5
    Join Date
    Nov 2008
    Posts
    116
    I'm reading links from an XML file and making a row of links in the document with them. Each link will be placed in a div and then added to the links div. When onmouseover I want to pop up a menu of items to choose from but I need to know where to place that popup menu. Every time I have just added a div and allowed the content to determine the size of it I'm unable to get the size of it so that I can place other elements relative to it.

    Am I missing something obvious?

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles