Jump to content

Fit window to any screen size


stockton

Recommended Posts

Is there any way that one can set up css so that the web page fits any screen size?

Look at www.stockton.co.za/LeaderBoard. Now I would like this to not show scroll bars on my Treo 650 cell phone but to also take up all the screen on a 42" monitor.

My css currently looks like:-

#SlotsWindow {
   position:absolute;                                                             :
   width:47%;
   height:77%;
   top: 120px;
   left: 20px;
   overflow: hidden;
   border: 2px solid red;
}
#TablesWindow {
   position:absolute;
   left: 529;
   width:47%;
   height:77%;
   top: 120px;
   overflow: hidden;
   border: 2px solid red;
}

#SlotsText {
   text-align: center;
   font-weight: bold;
   font-size: 20pt;
   position: relative;
   width: 50%;
   left: 65;
   top: 100;
}
#TablesText {
   font-size: 25pt;
   position: relative;
   right: 420;
   width: 50%;
   left: 65;
   top: 100;
}

Can this be done and if so how do I alter the css?

Link to comment
Share on other sites

AHHHH sorry - 9am Monday morning reading issues!!!

 

You should really consider creating a separate style sheet for each media type.

 

<link rel="stylesheet" type="text/css" href="/global/style/screen.css" media="screen" />

<link rel="stylesheet" type="text/css" href="/global/style/print.css" media="print" />

<link rel="stylesheet" type="text/css" href="/global/style/handheld.css" media="handheld" />

 

those style sheets above dictate the stites layout on a PC, printed document and a handheld device (pda, mobile phone) in that order.

 

It is simply the case that different device types do different things - so unless you provide a different 'contoller' for each media you will get unexpected results...

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.