[support] Making some changes to my Drupal

Larry Garfield larry at garfieldtech.com
Sat Nov 25 06:09:29 UTC 2006


Hi, Reynier.  Drupal's default theme output can be tricky at times because 
it's so heavy, I agree.  However, all default themes and all core modules 
output valid XHTML Strict and CSS, by design.  The example you gave, for 
instance, is valid XHTML Strict and CSS.  "div.title h2" is a perfectly valid 
CSS selector.  

So if someone insists that you output valid XHTML/CSS, then Drupal does that 
by default.  (What you do in your own theme is your business, of course. <g>)  
If, however, they want something with fewer CSS hooks (fewer nested <div> 
tags, for instance), then you'll need to override theme functions to change 
the HTML that gets generated.  See the theme developers handbook for ways to 
go about doing that:

http://drupal.org/node/509

90% of the time you'll only be interested in the PHPTemplate theme system, as 
that's what almost everyone uses.  XTemplate is deprecated and shouldn't be 
used anymore.

Cheers.

On Friday 24 November 2006 23:26, Reynier Perez Mira wrote:
> Hi to every:
> I'm newbiew working with Drupal and right now some people ask me for a
> clean page. What that's mean? Made only using CSS and XHTML valid both of
> them. I take a look at some tutorials in Drupal site but I'm encountered
> with some others problems. For example some parts, by default, have this:
> <h2 class="title">Something here</h2>. But I don't want really, I want
> something like that: <div class="title"><h2>something here/h2></div>, why?
> Simply: when I try to apply a padding to the class: h2.title the CSS rules
> logically move the entire element and I don't looking for that. I only need
> move the content of the element with class: title. See a little example
> below:
>
> <h2 class="title">Something here</h2>
>
> CSS rules:
> h2.title { line-height: 25px; padding: 0 0 0 10px; /* Move element 10px
> from the right to the left */ }
>
> Now If I have this:
> <div class="title"><h2>something here/h2></div>
>
> And then the some changes in my CSS rules:
> .title h2 { padding: 0 0 0 10px; /* Move text 10px from the right to the
> left */ }
>
> This is what I'm looking for. Understand?
> Cheers, thanks in advance and soury for my poor English
> --
> ReynierPM
> 5to Ing. Informática
> Maestro de poco, aprendiz de mucho

-- 
Larry Garfield			AIM: LOLG42
larry at garfieldtech.com		ICQ: 6817012

"If nature has made any one thing less susceptible than all others of 
exclusive property, it is the action of the thinking power called an idea, 
which an individual may exclusively possess as long as he keeps it to 
himself; but the moment it is divulged, it forces itself into the possession 
of every one, and the receiver cannot dispossess himself of it."  -- Thomas 
Jefferson


More information about the support mailing list