Results 1 to 5 of 5
  1. #1
    jatrant is offline Member
    Join Date
    Jun 2008
    Posts
    2
    Rep Power
    0

    Default Java Syntax for making 2 divs same height dynamically.

    The title may not make much sense but its a little tricky to explain in a sentence.

    What I have is 2 div's that are layered one on top of the other. The reason why is because 1 div has opacity settings (background) and the other is content (on top). The content will be dynamic coming from the database, so this is why I would like to set the "div Background" with the "div dontent" to match in height.

    What I basically need is a way for "div content" to tell "div background" what size it should be depending on how long "div content" is.

    I would really appreciate it if I could get some help with this issue.

  2. #2
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    26

    Default

    Sorry for showing my ignorance, but what's a "div"?

  3. #3
    kurenai is offline Member
    Join Date
    Jun 2008
    Posts
    9
    Rep Power
    0

    Default

    div as in <div>....
    i think this is a java script thing.
    you could just make an invisible table and give that the background you want and it will wrap to the next line.
    if you dont want that.....


    you may need to search around for character/ line count or get the curser position or something like that.

  4. #4
    Niveditha's Avatar
    Niveditha is offline Senior Member
    Join Date
    May 2008
    Posts
    307
    Rep Power
    7

    Default

    Did the initiater mean to be a division?
    I am not aware of java scripts much but if we can set some layout then we can set it gridlayout so that the divisions are equal all the time.

    Sorry if i am wrong...
    To finish sooner, take your own time....
    Nivedithaaaa

  5. #5
    jatrant is offline Member
    Join Date
    Jun 2008
    Posts
    2
    Rep Power
    0

    Default

    Sorry Guys I realized that I got the wrong forum for this question. My apologies.
    kurenai - I thank you for the suggestion but unfortunately i need both layers to be visible at all times so an invisible table wouldnt do the trick.
    Niveditha - No what i meant by div is exactly what kurenai said "html <div>" and my intentions were to get a java script.
    But im in the wrong place for this.

    Thanks for trying to help, cheers

Similar Threads

  1. Collapse all Divs
    By LWCARAB in forum New To Java
    Replies: 1
    Last Post: 04-15-2008, 07:42 PM
  2. making a count down timer using java
    By saytri in forum New To Java
    Replies: 3
    Last Post: 12-29-2007, 10:49 PM
  3. dynamising the height of a JPopupMenu
    By iimasd in forum AWT / Swing
    Replies: 6
    Last Post: 11-21-2007, 11:01 AM
  4. Making connect 4 in java
    By zoe in forum New To Java
    Replies: 1
    Last Post: 08-07-2007, 07:10 AM
  5. Making a Java web calendar
    By toby in forum Enterprise JavaBeans (EJB)
    Replies: 1
    Last Post: 08-07-2007, 07:05 AM

Posting Permissions

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