A Tricky PHP/HTML Question

General discussions related to php

Moderators: macek, egami, gesf

User avatar
WiZARD
Moderator
Moderator
Posts: 1257
Joined: Thu Jun 20, 2002 10:14 pm
Location: Ukraine, Crimea, Simferopol
Contact:

Re: A Tricky PHP/HTML Question

Postby WiZARD » Sat Feb 08, 2003 12:47 am

Hi!
A.1 If you want use random see images from the DB do next all images in array and use shuffle command.
A.2 About some space between images
solution 1: use dreamweaver for this (faster and simply)
solution 2: see maby other cell in youre table have a size more the other
solution 3: if S1 and S2 not help you see solution 1
:wink:

*JaH*
New php-forum User
New php-forum User
Posts: 80
Joined: Fri Jan 31, 2003 4:18 pm

Postby *JaH* » Fri Feb 14, 2003 4:24 pm

well to get the screenresolution there's only one way....Javascript :( Which sux ofcourse, but you can use it (with screen.width and screen.height.....but you could make it like
var width = screen.width;
var height= screen.height;
window.location = "http://yourserver.com/index.php?width=" + width + "&height=" + height;

something like that....

Hurkle
New php-forum User
New php-forum User
Posts: 36
Joined: Tue Jan 07, 2003 8:45 am
Location: Minnesota, USA

Postby Hurkle » Wed Feb 19, 2003 7:58 am

As far as getting the screen resolution, there's no automatic way that I know of that doesn't involve client side scripting (pretty much as stated above) I make a point of avoiding client side scripting like the plague. One way to get this info relatively quickly is to let the user select screen resolution right from the get go. I would have your splash page start out at 800x600, (or 640x480, altho that's not the default it used to be), and let the user click links for 'larger screen' or 'smaller screen' until they get something that looks just right for them.

As far as the extra spaces in your table, this kind of thing is common and annoying. The most common cause I've found for this is 'whitespace' automatically added when '<TD>' and '</TD>' tags are Not output on the same line. This sounds goofy, but it does have an impact. I've had the best luck getting rid of that by building all the contents of table cells into strings are arrays, and then spitting the whole table out at the end.

Hope this helps.


Return to “PHP General”

Who is online

Users browsing this forum: No registered users and 1 guest

cron