Old 05-20-2004   #1 (permalink)
Registered User
 
TVPR's Avatar
 
Join Date: May 2004
Location: Norway - North
Posts: 147

Resolution trouble, the bad sort

Right, erm, I think I've ruined things for myself, but you all know the Lyesmith 3.0 thread I started? I bet you do. I've been attention-craving about it ever since it started. However, now, version 4 of the site is about done. But it's huge. As in, massive. I thought I was clever, but was horribly wrong. So, this is the problem:

How can I eliminate the need for scrolling? It's far too wide now. Is there any way to read the client computer's resolution, and adjust its view accordingly? I think that has been done some places, I don't know. Take a look at the site, you'll see what's the problem... :/
__________________

Lyesmith.net
TVPR is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Old 05-20-2004   #2 (permalink)
Sheep Worrier
 
Man1c M0g's Avatar
 
Join Date: Sep 2003
Location: Portsmouth, UK.
Posts: 4,096
Blog Entries: 14

Send a message via ICQ to Man1c M0g Send a message via MSN to Man1c M0g Send a message via Skype™ to Man1c M0g
Ahhhhh, I had similar problems with my design for http://www.right-turn-productions.com. In the end I solved it by having an invisible loader page which then analyzed the size of the browser window, and passed a mySQL variable to the main design, which then selected formatting appropriately. I've posted the resolution-setting javascripting below for your viewing pleasure.

Code:
<script language="Javascript"><!--

if (screen.width <= 800) {
document.location = "interface.php?res=low";
}

if (screen.width > 800) {
document.location = "interface.php?res=high";
}

//-->
</script>
__________________
Man1c M0g is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Old 05-20-2004   #3 (permalink)
Lazarus' Child
 
malboroman's Avatar
 
Join Date: Nov 2003
Location: The Netherlands
Posts: 603

Send a message via MSN to malboroman Send a message via Skype™ to malboroman
as far as the scrolling is concerned... you can turn it off by using this piece of code in the 'body' tag...

Code:
<body scroll="no">  </body>
__________________


"Only the dead have seen the end of war."

- Plato
malboroman is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Old 05-20-2004   #4 (permalink)
Registered User
 
TVPR's Avatar
 
Join Date: May 2004
Location: Norway - North
Posts: 147

Thanks a whole screaming bunch, the both of you!

However, M0g: I don't have MySQL - but I do have PHP4 - on my host, so I don't know if I can do it. Also I'm really unfamiliar with php... So, erm, what do I have to do? Make new pages etc? I'm totally blank. And I really hope I don't have to make one separate version for the lower-res-than-1280 users... As I sliced the picture in 81 slices. And it took some time. And I love your tut's
__________________

Lyesmith.net
TVPR is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Old 05-22-2004   #5 (permalink)
Sheep Worrier
 
Man1c M0g's Avatar
 
Join Date: Sep 2003
Location: Portsmouth, UK.
Posts: 4,096
Blog Entries: 14

Send a message via ICQ to Man1c M0g Send a message via MSN to Man1c M0g Send a message via Skype™ to Man1c M0g
Ahhhh, don't worry TVPR, the technique I use only involves PHP code, and no mySQL. Anyway, what you need to do is pop the resolution detecting code above in a file called index.html. This will then call a file called interface.php, which includes the following code:

Code:
<?
// PHP Variables for different page sizes (each defined according to type)

// If low rez
if ($res == 'low') {
    $centercell = "374";
    $bgfile = "images/bg1.jpg";
    $iframesize = "240";
    $menusize = "";
    
// If high rez 
} elseif ($res == 'high') {
    $centercell = "574";
    $bgfile = "images/bg2.jpg";
    $iframesize = "440";
    $menusize = "410";
    
// If blank or invalid input - defined as copy of low rez
} else {
    $centercell = "374";
    $bgfile = "images/bg1.jpg";
    $iframesize = "240";
    $menusize = "";
}

?>
Then include your design HTML in the interface.php file as normal. In bits you want to be variable sizes, replace the pixel height/width with the variable above that depends on resolution with:

Code:
<? echo($VARIABLENAME); ?>

i.e. so you get <td width="100%" height=<? echo($centercell); ?>>, etc.
This isn't the simplest way of doing it, nor the most elegant, but it works an absolute charm and allows variable sizes without the use of alternating style-sheets, totally-seperate low-resolution pages, etc.
__________________
Man1c M0g is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Old 05-22-2004   #6 (permalink)
Registered User
 
TVPR's Avatar
 
Join Date: May 2004
Location: Norway - North
Posts: 147

Copied and pasted However, I'll simply stick to my current setup, a separate page for low-res users... Pop your res below 1152, and visit my site, you'll see I used the code tidbit you originally posted for an autodetect thingie, and uploaded yesterday or so - right before I posted the LS.net v4.1 topic.
__________________

Lyesmith.net
TVPR is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Old 05-23-2004   #7 (permalink)
Local Biorust Beast
 
Order's Avatar
 
Join Date: Oct 2003
Location: San Diego, CA, USA
Posts: 2,253

Send a message via AIM to Order Send a message via MSN to Order Send a message via Yahoo to Order
Yes, the standard size for web design is still 800x600, and it is always safe to design for that, but allow for bigger resolutions at the same time..
__________________
Order is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Closed Thread

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT +1. The time now is 01:22 AM.
Content Relevant URLs by vBSEO 3.2.0

Design & Content © BioRUST 2008 :: PRIVACY STATEMENT :: LEGAL INFORMATION :: ADVERTISING MEDIA KIT