Jump to content
  • Checkout
  • Login
  • Get in touch


The e-commerce.

Using Javascript to set width of my <td>


Recommended Posts

Hi, Im looking for a way to set the width of things on my page depending on the screen resolution people are using the Javascript





i was hoping to doe something like this


<script language="javascript">
<?php $width; ?> = screen.width;

if($width > 800) {
$var = 200;
} else {
$var = 20%;

store these values in a php $var and then put this in the width="$var"


im probably going about it in the wrong way but im pretty new and im having probs when people view my site in 800 x 600


Thanks for any help in advance

Link to comment
Share on other sites


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

  • Create New...