Div tag

Discussion in 'JavaScript' started by dean5000v, Mar 26, 2008.

  1. #1
    ok well basically when i create a div tag and give it a color and then add things inside e.g footer it will resize its self fine in internet explorer but in order to get it the right height u need to declare a height in FireFox does anyone know any javascript to auto make the div tag get bigger.
     
    dean5000v, Mar 26, 2008 IP
  2. vinod.kumar

    vinod.kumar Banned

    Messages:
    13
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    what is div tag???
     
    vinod.kumar, Mar 26, 2008 IP
  3. vinod.kumar

    vinod.kumar Banned

    Messages:
    13
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    please send me how to use
     
    vinod.kumar, Mar 26, 2008 IP
  4. dean5000v

    dean5000v Peon

    Messages:
    201
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    stop spamming my thread, if your not goin to help go away !!!
     
    dean5000v, Mar 26, 2008 IP
  5. So1

    So1 Peon

    Messages:
    45
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #5
    vinod.kumar, could u give a code, maybe how u adding a footer inside the div.

    dean, div is block-tag without specific propertys. google div ;-) Im from Russia, therefore i even dont know good site about html at english.
     
    So1, Mar 26, 2008 IP
  6. dean5000v

    dean5000v Peon

    Messages:
    201
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #6
    ok let's say i have a div tag called content and my css code is

    #content {
    width: 760px;
    height: 500px;
    background-color: yellow;
    }

    <div id="content">paragraphs of text go here </div>

    ok now in internet explorer u don't have to give the div tag a height so it height it will auto resize the height of the tag to fit in all of my text, but it wont in firefox thats why i have to give it a height normally which gets really anoyeing.

    do you know of any javascript that will auto make the div tag bigger when i insert stuff.
     
    dean5000v, Mar 26, 2008 IP
  7. So1

    So1 Peon

    Messages:
    45
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #7
    #my_div {background:#CCAACC;}

    <div id = 'my_div'>Paragraph is here</div>
    <input type="button" value="replace div content" onClick="document.getElementById('my_div').innerHTML = 'lorem ipsum dolor<br />lorem ipsum dolor<br>lorem ipsum dolor<br />lorem ipsum dolor';">

    works greate in all browsers. Maybe your FF-version build when there were dinosaurs on earth? :D
     
    So1, Mar 26, 2008 IP
  8. dean5000v

    dean5000v Peon

    Messages:
    201
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #8
    what i mean is say i have a main div tag with 400 pixels high and i put a new div tag in there 500 pixels high it will go over the top in firefox but internet explorer it will make the other div tag bigger.
     
    dean5000v, Mar 26, 2008 IP
  9. vinod.kumar

    vinod.kumar Banned

    Messages:
    13
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #9
    how to fix div size
     
    vinod.kumar, Jul 4, 2008 IP