TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

April 27, 2024, 02:21:31 PM

Login with username, password and session length
Members
  • Total Members: 3,885
  • Latest: Growner
Stats
  • Total Posts: 195,173
  • Total Topics: 21,219
  • Online today: 90
  • Online ever: 3,540 (September 03, 2022, 01:38:54 AM)
Users Online
  • Users: 1
  • Guests: 68
  • Total: 69
  • @rjen

TD issue...width

Started by Alexmosutheskypirate, February 01, 2007, 08:27:23 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Alexmosutheskypirate

<div class="tborder" ', $context['browser']['needs_size_fix'] && !$context['browser']['is_ie6'] ? ' style="width: 100%;"' : '', '>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td >';

if (empty($settings['header_logo_url']))
echo '
<span style="font-family: Verdana, sans-serif; font-size: 140%; ">', $context['forum_name'], '</span>';
else
echo '
<img src="', $settings['header_logo_url'], '" style="margin: 0px;" alt="', $context['forum_name'], '" />';

echo '
</td>

</tr>
</table>';


hello
ihave that code in indextemplate.php
it shows the main logo on my site..so i want it to stay with a width i give to the image...
if i put a 777px wide logo ...the site must not shrink to less than 777...no matter what... i changed things but i can't manage to o it..
i have a 1020px width logo ..and when i stretch the browser the image goes out of the < T D >
i want it to stick with 1020 not  less than 1020...and no more than 1020

anyone ?



saludos :D

IchBin

If your logo is stretching too far put the width/height tags on your image to specify to the browser that the image should not be bigger than that.

Alexmosutheskypirate

no the image is not stretching as you can see in the image..the image is the one not stretching ..but the forum is..the site is stretching and the image ...goes out of the layout
the logo is the red/green image
and the forum is the orange area...as you can see...
if you want we can forget about the image..i want my forum to have a fixed width...no change possible a 1000px wide forum...no stretching or enlarging..
can it be done ?

saludos :D

IchBin

Post your index.template.php and we'll take a look.

Alexmosutheskypirate

#4
here it is..attached

saludos :D

IchBin

Would be easier if you post the file as an attachment next time. :)

This code:
// TinyPortal start
     if($context['TPortal']['fixed_width']!=0)
             echo '<table align="center" width="'.$context['TPortal']['fixed_width'].'" cellpadding="0" cellspacing="0" border="0"><tr><td>';

// TinyPortal end

echo '
<div class="tborder" ', $context['browser']['needs_size_fix'] && !$context['browser']['is_ie6'] ? ' style="width: 100%;"' : '', '>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td nowrap>';

if (empty($settings['header_logo_url']))
echo '
<span style="font-family: Verdana, sans-serif; font-size: 140%; ">', $context['forum_name'], '</span>';
else
echo '
<img width="1000" src="', $settings['header_logo_url'], '" style="margin: 0px;" alt="', $context['forum_name'], '" />';

echo '
</td>

</tr>
</table>';


Not sure why the < td > would require a nowrap attribute. You should be able to get rid of that. As for making your forum a fixed width you should be able to set that in the first table where it says <table width="100%"
Change that to a fixed pixel size of your choice and see if it works.

Alexmosutheskypirate

i put the nwrap thing just to see if it has any effect...it didn't..
also tried the 1020 width..and ...it stil changes with the browser...
there must be something i can do...owww
thanks for trying  :up:
saludos :D

Alexmosutheskypirate

with this index.template.php i managed to get all the forum to 1000 width...
all of it...but the logo..
that bas_ard still expands with the browser...



saludos :D

IchBin

Can I see a link to your site so I can see it in action?

Nokonium

#9
I have made a graphic 1020px x 50px and can see your problem.

I have worked on default theme which has body padding of 30px right and left.

If you set the TP width to 1000px the graphic should align. If your body padding is different you may need to adjust the settings slightly. I used your original index.template.

I have checked it with IE7, FF2 & Opera 9.1 the only difference is that FF & Opera do not show the left padding, in IE you have padding both sides. I have attached the top left of the IE screenshot.

Alexmosutheskypirate

yes i managed to do it.. thanks
i set the tp width to 1000 and used the indextemplate in reply #7
now it's 1000 pixels wide..and stick with that width even if you expand the browser..
nice
thanks

saludos :D