Jump to content

Image size %


s1yman

Recommended Posts

hai s1yman,

 

<div id="div_id" style="height:300px; width:300px;">

<img id="img_id" src="PPX_T2.gif">

</div>

 

<script type="text/javascript">

document.getElementById('img_id').style.height = document.getElementById('div_id').style.height;

document.getElementById('img_id').style.width = document.getElementById('div_id').style.width;

</script>

 

Regards,

manoilayans

Link to comment
https://forums.phpfreaks.com/topic/121392-image-size/#findComment-626071
Share on other sites

Hi Manoilayans,

 

Thanks for the quick response. Is it possible to incorporate that to my css file?

One example div is as follows;

 

.div0
	{
	width:50%;
	float:left;
	text-align:center;
	position:relative;
	border-style:solid;
	border:solid 1px #0066FF;
	margin:1px;
	overflow:hidden;
	}

 

Thanks for the help.

Link to comment
https://forums.phpfreaks.com/topic/121392-image-size/#findComment-626342
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.