Autonav - Space between Images
Permalink
Hello everyone! I'm using Autonav for my menu system with Picture On/Off images for each menu item. Problem I'm having is that there is white space between each of my menu icons that I do not want. I looked at the source code and it looks like autonav is echoing each menu item to a separate line. From what I understand, if you each each menu item/image to the same line, the white space goes away..
Is there anything I can do in autonav's view.php to have it echo all of the menu items on the same line?
Is there anything I can do in autonav's view.php to have it echo all of the menu items on the same line?
![Mnkras](/files/avatars/781.jpg)
i don't understand what you mean, can you post some code examples
The autonav out puts this to the source code:
<a href="01"><img src="01.jpg"></a>
<a href="02"><img src="02.jpg"></a>
<a href="03"><img src="03.jpg"></a>
I want it to output this:
<a href="01"><img src="01.jpg"></a><a href="02"><img src="02.jpg"></a><a href="03"><img src="03.jpg"></a>
<a href="01"><img src="01.jpg"></a>
<a href="02"><img src="02.jpg"></a>
<a href="03"><img src="03.jpg"></a>
I want it to output this:
<a href="01"><img src="01.jpg"></a><a href="02"><img src="02.jpg"></a><a href="03"><img src="03.jpg"></a>
just so you know, thats not going to make a difference, look into your css
I did look at my CSS.. I've tried everything and can't do it.
When I view it in an HTML file I've created, with the HREFs side by side like I showed you, it displays fine.. When I put it in autonav and it puts each HREF on a separate line, I get the white space.
When I view it in an HTML file I've created, with the HREFs side by side like I showed you, it displays fine.. When I put it in autonav and it puts each HREF on a separate line, I get the white space.
thats not going to affect it, its your css
CSS aside, is there a way autonav can output how I want it to? If not, just say NO please instead telling me it wont work.
Thanks.
Thanks.
it can, i just don't see how you made it output image tags without editing the view in the firstplace,
http://www.codeblog.ch/2009/12/image-navigation-items/
Look man, can you help or not? You say it can but you provide no help at all.. If you can't just please move on.. Thanks..
Look man, can you help or not? You say it can but you provide no help at all.. If you can't just please move on.. Thanks..
Are you using an older version of IE to view your site? I know there are a few weird bugs in IE where whitespace in the markup actually does affect the page layout.
Anyway, modifying the autonav template to do this is going to be a little tricky. Follow the instructions on that last link you posted (to codeblog.ch) to see how to create a custom template. But in your custom template you're going to want to put this near the top:
Then everywhere in that file you see the word "echo", replace it with this:
So, for example, if there's something like:
you would replace it with this:
(that's just an example, I'm not sure that exact line exists in the file ... just showing how the replacement works).
Then at the end of the file, add this:
That should output the whole thing as one long line, without linebreaks.
Hope that helps!
-Jordan
Anyway, modifying the autonav template to do this is going to be a little tricky. Follow the instructions on that last link you posted (to codeblog.ch) to see how to create a custom template. But in your custom template you're going to want to put this near the top:
$output = '';
Then everywhere in that file you see the word "echo", replace it with this:
$output .=
So, for example, if there's something like:
echo '<li>';
you would replace it with this:
$output .= '<li>';
(that's just an example, I'm not sure that exact line exists in the file ... just showing how the replacement works).
Then at the end of the file, add this:
echo $output;
That should output the whole thing as one long line, without linebreaks.
Hope that helps!
-Jordan