Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Create a div tag?

edited November 2005 in Vanilla 1.0 Help
I love filebroswer. Only one issue, however. I don't like how it stretches from right to left. I want it contained. I want it in a fixed-width box. So, I need to know how insert a div tag into the page, a div tag that occurs right after the body tag, that way, I can use the div tag to act as a wrapper!. Unfortunately, its PHP and not HTML, so I don't know how to insert it. Any help?


  • edited August 2005

    EDIT: Sorry. I did a nice write up on how to do it, but it did not turn out so well. Just use the link below, and I will try and show you how it is done in a few mintutes.

    (you could also use this one I prepared earlier.)

    Now, all you have to do is add a wrapper element to the css file, and style it as you wish (like centering it, etc.)

    Any other questions? Let me know.
  • Attempt #2. *fingers crossed* Open up the index.php file in a text editor. Go to line 205. This is the line that prints the html body tag. I assume, as you want it all in a container, that the div will be right below the body tag, before everything else. Add the following line BELOW that line. <div id="wrapper"> Now, to close things up, go to line 1430 (this is assuming you have already added the above line). This line closes the html body tag. Add the following code ABOVE this line. </div> Save the file. and you are done. Now, all you have to do is define the wrapper class in your css file, and then sytle it how you want. That should be it. I hope that helps.
  • MarkMark Vanilla Staff
    Uhhh. Actually, you don't need to do anything like that at all. The filebrowser comes with a "wrapper" div that I call "SiteContainer" Just view source of any page of the filebrowser and you'll see that the first div after the body tag is: <div class="SiteContainer"> Just alter the css and you're done.
  • Well... that solves a few of my problems :P I did not take that close a look at the source, I just assumed that a new division was required. *mental note: never assume with lussumo software* Thanks mark.
  • MarkMark Vanilla Staff
  • Well, sweet! Thank you, both of you.
  • just dropped in filebrowser to my "schoolwork" directory.. super simple super ez! Love it.. One quick question to add to this thread, any easy 1 or 2 liner mod to have the list items be stacked "vertically" instead of across? I have mainly files, and have disabled previews, so there is no sense to have file names repeat horizontally. I'd rather the more vertical list style. My css sucks so i can't seem to find which line to edit. Thanks!
This discussion has been closed.