html - Get screenwidth from javascript function and use as percentage -
i have resize table elements based on screen's width. i'm not knowledgable javascript or html, have work. did not write original asp page, nor can change it.
for instance in following code example, screenwidth placeholder variable or function call:
<td> <div style="width:(screenwidth * 2 / 3)%"> <input type="text" class="textfield" id="resourceref" name="resourceref" accesskey="e" onkeydown="infochange('ref');" style="width: 90%"> </div> </td> i thinking of using javascript function in call screen.width, , return value of screenwidth, syntax doesn't seem right whether put function call in " , " or ' , '.
perhaps there way of doing this, reasoning.
it coded simple percentages, didn't work correctly. td, in table, in frame part of frameset of 3 vertical frames, , right there frame obscures of table elements if screenwidth narrow. didn't write way, , don't know frames, have fix this. want know screenwidth is, , adjust suitably before use determination of width of td.
so if have (and might more screenwidth besides returning it)
<script language="javascript"> function getscreenwidth() { return screen.width; } </script> in head tag, how must call html?
so how can screen's width part of determination of td's width?
should able screen.width screen width in pixels. though, there particular reason not using width: 66.666% in case?
Comments
Post a Comment