PhpDig.net

PhpDig.net (http://www.phpdig.net/forum/index.php)
-   Troubleshooting (http://www.phpdig.net/forum/forumdisplay.php?f=22)
-   -   Horizontal scrollbar in template (http://www.phpdig.net/forum/showthread.php?t=969)

Hoek 06-01-2004 12:58 AM

Horizontal scrollbar in template
 
Hi Forum,

With some search-queries I get a horizontal scrollbar in the template wich is displaying the result. This scrollbar sometimes appears, and sometimes not, depending on de query. You can see this at www.professioneel-handhaven.nl. The site is in Dutch, but that should not matter...

When you search the term 'baudina' you get 2 hits as result, with horizontal scrollbar. When you search 'baudina sonja' you get the same hits, without scrollbar?

Who can help me out with this strange problem? I tried several standard templates, all with the same problem.

Rolf

vinyl-junkie 06-01-2004 04:35 AM

I'm not sure exactly where the problem is, but I'd start by looking at places within your code where you specify width in your table as pixels instead of percentage. For example, this:
PHP Code:

<img src="tpl_img/bar_middle.gif" height="16" width="100.00" alt=""

There are two places I see with code similar to the above. Also, there's this:
PHP Code:

<img src="../../images/achtergrond.jpg" width="800" 

I'm not sure just what part of the page that is, but if you're going to use pixels instead of percent that should be no more than 780. In a browser with 800 x 600 resolution, 10 pixels on each side get chopped off so 780 should prevent horizontal scrolling - provided there isn't something else that I missed in scrutinizing your code.

Something else to consider. Percentage is the preferred method, in my opinion, because the page will render better in different resolution browsers that way.

Hope this helps. :)

Hoek 06-01-2004 06:44 AM

Unfortunetely, your solution does not work. By the way: when you search for instance 'baudina sonja' the layout is OK, so there must be a problem in the way de phpdig-scripts generates the code.

I put the template in a layer with fixed horizonta size, and variable vertical size. I wonder why is works sometimes , and sometimes not, depending on the search-string.

vinyl-junkie 06-01-2004 12:49 PM

This is untested, but find the following code in search_function.php
PHP Code:

'img_tag' => '<img border="0" src="'.WEIGHT_IMGSRC.'" width="'.ceil(WEIGHT_WIDTH*$weight/100).'" height="'.WEIGHT_HEIGHT.'" alt="" />'

and replace it with
PHP Code:

'img_tag' => '<img border="0" src="'.WEIGHT_IMGSRC.'" width="'.WEIGHT_WIDTH.'" height="'.WEIGHT_HEIGHT.'" alt="" />'

Be sure to remove any word wrapping in the above code.

Let us know if this solves the problem. :)

Hoek 06-01-2004 11:31 PM

I tried your suggestion, but with no results. I decided to choose the easy way: I increased the text-layer width from 380px to 550px. It did not solve the problem, but gives acceptable output-results.

Thank you for your help.


All times are GMT -8. The time now is 03:19 AM.

Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright © 2001 - 2005, ThinkDing LLC. All Rights Reserved.