[pmwiki-users] CSS question related to FGS

John Feezell JohnFeezell at 3wplace.com
Tue Feb 15 23:58:50 CST 2005


Bronwyn Boltwood wrote:

>On Tue, 15 Feb 2005 08:47:29 -0600, John Feezell
><JohnFeezell at 3wplace.com> wrote:
>  
>
>>Is there a better way to structure the <div>s?
>>    
>>
>
>As Knut pointed out, you should definitely use classes or ids to build
>in your style hooks.  It will be more flexible, and lighter page
>weight, because the styles can be stored in an external stylesheet,
>which the reader's browser caches for reuse..
>
>  
>
>>Should I be using <p>s instead?
>>    
>>
>
>You should only use a p tag if the text inside is genuinely a
>paragraph.  That's what they mean by clean, semantic markup.
>
>  
>
>>How do <div>s and <p>s compare?  One 'better' than the other?
>>    
>>
>
>A div is a generic block element -- it doesn't have any built-in
>presentation or semantic meaning.  It is a better choice if you're
>grouping content for layout purposes.
>
>  
>
>>If I wanted to place two divs side-by-side horizontally would that
>>require a table structure?
>>    
>>
>
>Not necessarily, but depending on what browsers you're trying to
>support and how complicated a layout you're aiming for you might want
>to.
>
>I suggest you do some googling about how to do forms using CSS,
>because there are some tags and techniques out there to make your life
>easier, like the fieldset and label tags.  Unfortunately I can't dig
>them out for you; I have to go back to my yak shaving.
>
>Bronwyn
>
>  
>
Just wanted to say thanks to you, Pm, and Knut for you input.  It was 
very helpful and gave me the direction I needed to move ahead.  It looks 
like I'll be able to fully integrate CSS into the FGS quickly.

After reading your comments and some other sources on the web, I decide 
to use a combination of class and style so that my structure now looks 
like the following:

<div class='$wcla' style='$wsty' >  /* wrapper */
    <div class='$ccla' style='$csty' >  /* cue */
         <div class='$fcla' style='$fsty' >  /* field */
               <input class='$icla' style='$isty' >  /* input */
         </div>
    </div>
</div>

This structure should support stylesheet definitions by the 
administration that would be
stored in pub/fgs and at the same time permit an override or extension 
to be entered at the time the form is defined within PmWiki.

I'm hoping to have a prototype up and running in the next few days.

Again, thanks and if anyone has other comments, I'd appreciate the feedback.

/JF




More information about the pmwiki-users mailing list