OT: Php template system and IE css issues

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
Please bare with me there IS a phpish question here. ( maybe )

I have written a simple template engine that replaces } } (
there are others ) in a html file with generated content.

All generated output is encapsulated with xhtml complient <div> and
<span> tags with appropriately named class tags for css manipulation .
Doing so takes most of the design out of php and into the hands of the
user to use css to handle formatting.

This is all nice and simple for me as I only have to worry about
generating correct xhtml. A friend of mine may have hit a usability snag.

When a extenal link is generated in a post (
[url=http://etc]nicename[/url] or [url]http://etc[/url] ) i generate
links with class='extlink' for css specialization .

My friend realized that my :after css to generate
a wiki styled img at the end will not work in in ie .

Now I _think_ the way around this is to have a span to allow for ie
browsers to insert a background image <a href class='extlink'>name<span

( someone please suggest a site / newsgroup dealing with css . googling
for ie hacks is giving me a headache trying to pin them down )

I know ,I would I be better off, just adding the span for those wanting
to cater for IE. But I feel dirty writing a tag JUST to accommodate
style. But I realize 22 uncompressed bytes ,per link , is not going to
break any budgets and there is no point writing a conditional to check
for IE specific output.

Do any of you who do professional work consider this something they have
to just do to get things the way you want?

I have just wasted two days looking at css/JavaScript hacks ? do they
Even work? ( lack of a windows system to test atm and wine is not
playing happy with ie atm )

Meh .This whole post is mainly rhetorical.Any comments ,links , even
sarcasm will be welcome

regards trookat

Re: OT: Php template system and IE css issues

trookat escribió:
Quoted text here. Click to load it

The reason why you can't add the background image to the <a> tag itself
is... :-?

-- http://alvaro.es - Álvaro G. Vicario - Burgos, Spain
-- Mi sitio sobre programación web: http://bits.demogracia.com
-- Mi web de humor al baño María: http://www.demogracia.com

Re: OT: Php template system and IE css issues

Álvaro G. Vicario wrote:
Quoted text here. Click to load it
thanks for the reply.

After much digging i discovered I could use background-position (
http://www.w3schools.com/css/pr_background-position.asp )

I fiddled around and came up with

background-image: url('extlink.png');
background-repeat: no-repeat;
background-position: center right;

Works in firefox ,  i'll get some friends to test it once ive upload the
latest alpha for testing

regards trookat

Re: OT: Php template system and IE css issues

Quoted text here. Click to load it

Conditional comments and behaviours are a better way of dealing with
this than writing browser specific PHP/Javascript but its still a
rather ugly hack. I'd lean towards using a re-writing engine to insert
the image inline in the HTML.


Site Timeline