[pmwiki-users] Idea for a recipe - Avoid Css Hacks
Carlos A. Bonamigo
carlos.ab at gmail.com
Sun Nov 19 21:16:01 CST 2006
Em Domingo 19 Novembro 2006 23:53, você escreveu:
>
> On Nov 19, 2006, at 1:08 PM, Carlos A. Bonamigo wrote:
>
> > Hi again, I was looking for easier ways to obtain browser
> > compatibility for a
> > skin and I saw an article about how to handle css with php.
> >
> > The code looks like this:
> >
> ...
>
> > Making a way out of the labirynth css can be sometimes.
> >
> > So, is it a good idea for a recipe?
> >
> > Carlos
> >
> >
> > (The article and the script can be found here ->
> > http://www.stylegala.com/articles/no_more_css_hacks.htm)
>
> I don't use css hacks anymore. I've found several ways around the
> problems without needing "hacks". I don't need the css box hacks,
> and I'm trying to remember what the other big problem was... Boxes
> are resolved by nesting an additional div and using margins on the
> inner div, instead of padding on the outer div. The visual effect is
> exactly the same. I don't consider that a hack, since now all
> browsers are in 100% agreement over what they're doing -- I just
> think in terms of anything fixed width needing to be a container
> object on the page.
>
> The other problem is resolved using the !important attribute, which
> is ignored by IE 6. It's a minor hack/work-around, but definitely
> does not require using separate css files. You set the attribute
> with !important, then set it again with the settings you want IE 6 to
> use. Other browsers that respect !important ignore the new setting
> for the attribute, IE 6 doesn't.
>
> IE 7 presumably won't have these problems.
>
> So, while I'm a designer and constantly making custom designs for
> websites, I've found I don't really need complicated hacks &
> workarounds anymore. At least they all seem to work when I test them
> in browsers. I still occasionally curse IE 6, but I've found that
> pretty much all I have to do is a search for padding to figure out
> the issue ;) then I have to figure out a way to change the padding
> into a margin.
>
> Are there reasons for your recipe aside from hacks around browsers?
>
> Crisses
>
Yes, maybe I just don't no much about css, but dependenig on wich mode you use
you'll need it., specifically on quirks mode.
I'm having problems with typography between ie 5.5/6.0/7.0, FF, Opera and
Konqueror. Firefox does not seem to cooperate which is a surprise to me as
everything I did before looked good on it from the start.
Also, I'm having some problems making the sidebar and #wikitext stretching to
the footer evenly.
One thing I tought was to count the number of words or maybe characters or
even lines, to see how much margin I'll have to add at the end of #wikitext
and then all I have to do is to throw the rule to $HTMLStylesFmt , so te gap
between #wikitext and the footer won't show.
When #wikitext has less content than the sidebar a gap appears right bellow it
and I couldn't figure out other solution that works on ie 5.5/6.0/7.0, FF,
Opera and konqueror.
If you have a better solution/suggestion I'll be glad to hear it.
TIA
Carlos
( Your tip about the margins really worked, thanks! )
More information about the pmwiki-users
mailing list