Find jobs - Rome hotels - Web Hosting - Web Hosting - Wordpress Themes

PDA

View Full Version : Div tag


dean5000v
Mar 26th 2008, 4:28 am
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.

vinod.kumar
Mar 26th 2008, 4:37 am
what is div tag???

vinod.kumar
Mar 26th 2008, 4:43 am
please send me how to use

dean5000v
Mar 26th 2008, 4:48 am
stop spamming my thread, if your not goin to help go away !!!

So1
Mar 26th 2008, 6:51 am
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.

dean5000v
Mar 26th 2008, 6:57 am
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.

So1
Mar 26th 2008, 7:23 am
#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

dean5000v
Mar 26th 2008, 9:52 am
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.

vinod.kumar
Jul 4th 2008, 9:42 am
how to fix div size