PDA

View Full Version : style problem ..


Daky
04-30-2007, 09:09 PM
Hi,
I have a little template problem.
To be honest with you i dont have idea where problem could be.

I hope somone will be able to help me with this.

My website is : www.diskusije.net

Problem:

Here it shows that table is aligned properly when user is logged in.

http://www.diskusije.net/svastara/logged-in.jpg

Here it shows that table is not aligned properly when user is logged off.

http://www.diskusije.net/svastara/logged-off.jpg


... this only happens when user is logged in or logged off.

Any1 have idea how to fix this?

Thank you!

Princeton
04-30-2007, 10:25 PM
check postbit_wrraper ... $spacer_open, $spacer_close

Daky
04-30-2007, 10:42 PM
Hi,
I really dont know what to look there for :))

Here is my wrapper:

<!-- post #$post[postid] -->
<if condition="$show['spacer']">
$spacer_open
<div id="edit$post[postid]" style="padding:0px 0px $stylevar[cellpadding]px 0px">
<if condition="!$post['islastshown']"><!-- this is not the last post shown on the page --></if>
</if>

$postbit

<if condition="$show['spacer']">
</div>
$spacer_close
</if>
<!-- / post #$post[postid] -->

Thank you sir!

CyberAlien
05-01-2007, 05:53 AM
Remove $spacer_open and $spacer_close from that code

Daky
05-01-2007, 06:05 AM
That did not work for me.

Here is a picture of what happens when i remove it.

https://vborg.vbsupport.ru/

Now its not good when i am logged-in, but when logged - off its ok :)

CyberAlien
05-01-2007, 06:08 AM
Try replacing spacer_open with this:<!-- open content container -->
<if condition="$show['old_explorer']">
<table cellpadding="0" cellspacing="0" border="0" width="$stylevar[outertablewidth]" align="center"><tr><td class="page" style="padding: 0">
<else />
<div align="center">
<div class="page" style="width:$stylevar[outerdivwidth]; text-align:$stylevar[left]">
<div style="padding: 0">
</if>

Daky
05-01-2007, 06:12 AM
After i did that, all tables are going to the end of the page, it is all connected.


http://www.diskusije.net/svastara/nospace.jpg

CyberAlien
05-01-2007, 08:32 AM
Another solution is edit template postbit_wrapper, and replace $spacer_open with code I posted above. Or you can open header template and add padding to main table instead of using spacer_ templates.

Daky
05-01-2007, 03:28 PM
Hi,
After i do edit postbit_wrapper i get the same as:

http://www.diskusije.net/svastara/blah1.jpg

Problem fixed, thanks to CyberAlien.

Daky
08-21-2007, 04:52 PM
Daky is back with the same problem :/

After upgrading to 3.6.8 and reverting the templates i have the same problem.

I tried to reach CyberAlien, but he does not respond.

Is there anyone else who could help me with this?

Thank you!
D

Any1 pls? :erm:

Daky
08-23-2007, 02:42 PM
Somebody pls help me ...

Thanks! ;)

Lynne
08-23-2007, 04:17 PM
You have this div tag right before the table:
<div style="padding:0px 25px 0px 25px">

It is giving you a padding of 25px for both the left and right. Is that perhaps the problem you are having?

Daky
08-23-2007, 04:38 PM
:/

Well, might be, i am not sure.
I am no expert in this, its more like newbie :))

I really would need like .. someone to tell me exactly what to do ... about this problem.

Thank you tho :)

Lynne
08-23-2007, 04:57 PM
If you go to Admin CP > vBulletin Options > General Settings, you can turn on "Add Template Name in HTML Comments" and then when you look in the source code of the page, you can see which template that div tag is located in. Then you can remove the style part of the div tag and see if the page then renders how you want it.

Daky
08-23-2007, 05:40 PM
Hi,
looks like spacer_open is the problem, but, i dont know what to remove\add\modify there.

I tried to remove :
<div style="padding:0px $stylevar[spacersize]px 0px $stylevar[spacersize]px">

That did not help.

Here is full code of spacer_open:

<!-- open content container -->
<if condition="$show['old_explorer']">
<table cellpadding="0" cellspacing="0" border="0" width="$stylevar[outertablewidth]" align="center"><tr><td class="page" style="padding:0px $stylevar[spacersize]px 0px $stylevar[spacersize]px">
<else />
<div align="center">
<div class="page" style="width:$stylevar[outerdivwidth]; text-align:$stylevar[left]">
<div style="padding:0px $stylevar[spacersize]px 0px $stylevar[spacersize]px">
</if>

Thank you!
D

Stickers
08-23-2007, 06:15 PM
I got the same problem when i add the ads google in the 1first post and last, maybe for you the Marketing hack is the problem,

Daky
08-23-2007, 07:37 PM
Hi,

I just tried disabling that hack, still, the same problem.

D

Lynne
08-24-2007, 03:13 PM
Well, I would either try changing the div tag to simply <div> or I would go into my Style Vars and set "spacersize" to 0 and see if that fixes the problem.

Daky
08-24-2007, 03:25 PM
Hi,

Just tried both of them, still the same problem.

Any other advice?

Thanks,
D

Lynne
08-24-2007, 04:39 PM
There are three places in the showthread where you have spacer_open. When I saved your page to my comp, I replaced all three of the div tags (the one with the 25px left/right padding) with a plain div tag. It got rid of the problem, however it also got rid of the 25px left/right padding on that page. I think you need to find where the spacer_open template gets called in the postbit_wrapper template and get rid of it (and spacer_closed in there too) and see if that fixes the problem. Don't forget to do a force refresh on the page because you should have seen a difference before.

Daky
08-24-2007, 04:59 PM
Hi,

In this code:

<!-- post #$post[postid] -->
<if condition="$show['spacer']">
$spacer_open
<div id="edit$post[postid]" style="padding:0px 0px $stylevar[cellpadding]px 0px">
<if condition="!$post['islastshown']"><!-- this is not the last post shown on the page --></if>
</if>

$postbit

<if condition="$show['spacer']">
</div>
$spacer_close
</if>
<!-- / post #$post[postid] -->

When i remove this: $spacer_open , top of the page looks ok, but not the bottom.
If i remove $spacer_close , again it is not ok.

Lynne
08-24-2007, 05:23 PM
I think you need to remove both spacer_open AND spacer_close in order for it to look right. I did it on my harddrive and it looked fine. Like this (copy/pasted from yours above):

In this code:

<!-- post #$post[postid] -->
<if condition="$show['spacer']">

<div id="edit$post[postid]" style="padding:0px 0px $stylevar[cellpadding]px 0px">
<if condition="!$post['islastshown']"><!-- this is not the last post shown on the page --></if>
</if>

$postbit

<if condition="$show['spacer']">
</div>

</if>
<!-- / post #$post[postid] -->

Daky
08-24-2007, 05:30 PM
Hi

After i remove both of them, this happens:

http://www.diskusije.net/svastara/after-remove.jpg

Lynne
08-24-2007, 06:09 PM
OK, you know what I noticed. in comparing it to my test site is that you do not have a spacer_open and spacer_close after the navbar template. When I added that to my test page, it made everything in line. It seems like that got removed somewhere along the way.

(You closed your forums so I was unable to take a new copy of your source to see if this really was the problem.)

Oh, and you also have an empty "spacer_close" after the <!-- / toolbar --> that needs to not be empty.

Daky
08-24-2007, 06:29 PM
Actually...

Can you log in my forum with Admin access and check it? see if you can fix it.

Thank you!
D

Lynne
08-24-2007, 07:12 PM
Actually...

Can you log in my forum with Admin access and check it? see if you can fix it.

Thank you!
D
I can try. I'll send you a PM.

Daky
08-26-2007, 04:16 AM
I just would like to thank Lynne.

Thank you! for helping me fix my problem! Without you nothing would be done.

D