And back on track again...

I've put this in the StyleSheet:
.stretch input { width:99%; }

I've put this in the ViewTemplate:
<div class="stretch" macro="edit tekst 5"></div>
I've even tried to put it into a table to somehow force it to strech
in relation to the table..
Like this:
<td style='width:100%'>
<center <div class="stretch" macro="edit tekst 5"></div></center>
</td></table>

None of it seems to work on the editorbox - It still keeps the same
width..

Because of my lack of fundamental understanding of HTML-syntax - I've
even tried to insert style='width:100%' into the line:
<td style='width:100%'>
<center <div class="stretch"style='width:100%' macro="edit tekst 5"></
div></center>
</td></table>

Of course that didn't work either...

I stop here - and live with the small inputbox - that I managed to
center under my inputform - by accident - trying to strech the
imputbox inside a table..
I think I learn best by playing around with possibilities- and maybe
that's why I enjoy TW so much. It's that different people can approach
it in so many different ways and stil get something useable out of it
- very inspiring...

Btw - I used several hours last night to translate
http://r.a.hough.googlepages.com/StrengthsandDifficultiesQuestionnai.html
into Danish. It's a perfect example on how to make a form on TW-
principles: tiddlers titles as questions and radiobuttons for sorting
answers, with inbuilt statistics in form of tables. It is great for me
to discover, as I tried to make an questionnaire about a month ago
based on what I've seen in more conventional forms, trying to adapt
the UnaMesaApplicationForm (My version here: 
http://behovsanalyse.tiddlyspot.com/).
There's still a steep curve for me to climb - if I want to gather the
information into tables and make it usefull for my purposes... The
StrengthsandDifficultiesQuestionnaire is much more simple for me to
adapt - because it has it all in one place - no need for
serversideimplementations of any kind (in my case (this time)
anyway)..

YS Måns Mårtensson

On Apr 19, 2:31 pm, Måns <[email protected]> wrote:
> Hi Eric
>
> Thanks for taking your time to give me a basic lesson and a better
> understanding of CSS and HTML-syntax.
>
> You are right - when you assume that I *sometimes*  is "just thrashing
> about,
> randomly mashing together various different bits of syntax in the
> hopes that something might work, and then repeating any sucessful
> syntax patterns by rote, without having a clear understanding of *why*
> those patterns work""
>
> About 2 months ago, when I started to do things with TW - I tried to
> get some basic help from my two eldest sons (age 15 and 17).
> They are both very good at writing html and especially the youngest is
> very knowledgable and can do many things with php-code (from the
> ground up) as well..
>
> They tried to help me in writing a basic html-form intended to be a
> template (on the "ViewSide") in a TW  - during this process of html-
> writing, they showed me that TW behaved in a way that seemed to be
> more or less random. They couldn't do the "layout-things" with the
> HTML-form that they would have expected from "normal" HTML... - so I
> ended up fiddling around - and trying stuff to see what worked - and
> what didn't.
>
> Of course you are right about the fact that I should read some more
> about basic HTML and CSS syntax, to save myself and other people -
> time and effort... I will, and I do (even if it doesn't always seems
> that way, given the fact that I sometimes ask VERY basic questions...)
> But again, - I get impatient - and I'm sorry if I have tired you and
> others with my constant flow of different questions!! - Still I
> appreciate very much that some of my questions are answered, and hope
> that someone with similar difficulties also benefits from the
> answers..
> My questions on this forum reflect the great distance there is
> between, what I'm trying to accomplish (often successfully - which has
> been great motivation for me ..) and the fact that I'm a complete
> novice on these fields...
>
> I hope that the balance eventually will be "restored" - That I will be
> able give back some of the great things that I learn from "TW'ing"...
> I try to answer at least as many threads as I start - and restrict
> myself to ask about things that I can't find answers for (or
> understand) on tiddlywiki.org, twfortherestofus 
> (http://www.giffmex.org/twfortherestofus.html), twhelp (http://tiddlyspot.com/
> twhelp/) or in this forum...
>
> Btw - I'm father of 4 children, a fulltime teacher at a boarding
> school with day and night shifts , computer&networkadministrator -
> musician,  when I find the time and gigs... -
> When I read litterature it's mostly related to my teaching (Danish,
> Christendom, Arts, Music).
> When working with TW i seek fast solutions to very different things...
> and I consider it to be a hobby - a tool for getting my work done and
> a possible outcome of my efforts could be that some of my colleagues
> will start to use it as well...
>
> YS Måns Mårtensson
>
> On Apr 19, 8:45 am, Eric Shulman <[email protected]> wrote:
>
> > > And this in the ViewEditTemplate (it doesn't work!):
> > > <div class {{stretch input{macro='edit tekst 5'>}}}</div>
>
> > No disrespect intended in any way, but...
>
> > I think perhaps you (and I :-) would benefit greatly if you were to
> > read through a basic primer on HTML and CSS syntax.  (Sorry, I don't
> > have any specific recommendations... but I'm sure you can find some
> > online references that will help... just search around a bit...)
>
> > By now -- after asking *so* many detailed technical questions over the
> > past several months -- I'd expect that you would have built up some
> > sense of how the various parts of TiddlyWiki are written... e.g., the
> > differences between CSS syntax (stylesheets), HTML syntax (templates),
> > wiki syntax (tiddler content), and javascript syntax (plugins, inline
> > scripts, onclick handlers, etc.).
>
> > Unfortunately, it seems that sometimes you are just thrashing about,
> > randomly mashing together various different bits of syntax in the
> > hopes that something might work, and then repeating any sucessful
> > syntax patterns by rote, without having a clear understanding of *why*
> > those patterns work (which, of course, makes it much more difficult to
> > apply them to other use-cases).
>
> > At the very least, you should always start by looking at how things
> > have already been written.  For example, even with various TW-specific
> > enhancements, the TW template definitions must *always* use valid HTML
> > syntax.  This means using properly nested matching "<" and ">"
> > delimiters around each element declaration, as well correct use of
> > either single- or double-quotes surrounding the values used in
> > attribute declarations.
>
> > For example, in response to your current question (how to apply a
> > custom class in a template)...
>
> > If you examine your existing templates (including the built-in shadow
> > definitions), you will see that nearly every <div> and <span> includes
> > a class attribute, followed by a TW macro, using this syntax:
>
> > <div class="..." macro="..."></div>
>
> > The value of the class attribute is a CSS 'selector', composed of one
> > or more CSS class names (e.g., "stretch", "floatright bold", etc).
>
> > The value of the macro attribute is the same as you would enter when
> > using a macro directly in tiddler content, except that you use quotes
> > (single or double) instead of the << and >> that usually surround the
> > macro.
>
> > Thus:
> >    <div class="stretch" macro="edit tekst 5"></div>
>
> > When the template is processed and macro="edit tekst 5" is rendered,
> > it creates an "input" element *within* the containing DIV (which has
> > class="stretch").  Thus, the CSS rule you declared in your
> > [[StyleSheet]] (i.e., ".stretch input { width:99%; }") will be applied
> > and the input field will be rendered at 99% of the width of the
> > element that contains it.
>
> > Of course, there are other (optional) attribute values that you can
> > define in addition to class="..." and macro="...", and some of these
> > contain different kinds of syntax *within* their values.  For example:
> > style="..." uses CSS syntax (e.g., "font-size:36pt;color:red;"), while
> > an onclick="..." declaration contains javascript programming to handle
> > 'click' events on that element.
>
> > Once you have gained some generalized knowledge of basic HTML and CSS
> > syntax, I think you'll find that you will probably be able to quickly
> > answer many of your own questions, which should hopefully save a great
> > deal of time and effort for all concerned.  In fact, if you are
> > feeling particularly adventurous, you might also want to pick up a
> > beginner's book on javascript programming, given the extensive use of
> > custom-written inline scripting in your document(s).
>
> > enjoy,
> > -e
> > Eric Shulman
> > TiddlyTools / ELS Design Studios
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/TiddlyWiki?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to