Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

OT: Php template system and IE css issues

0 views
Skip to first unread message

trookat

unread,
Dec 19, 2008, 2:39:15 AM12/19/08
to
Please bare with me there IS a phpish question here. ( maybe )

I have written a simple template engine that replaces {{body}} {{nav}} (
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 {content:url(extpic);} 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
class='extico'/></a>

( 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

"Álvaro G. Vicario"

unread,
Dec 19, 2008, 3:12:24 AM12/19/08
to
trookat escribió:

> 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 {content:url(extpic);} 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
> class='extico'/></a>

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
--

trookat

unread,
Dec 19, 2008, 4:28:39 AM12/19/08
to
Álvaro G. Vicario wrote:
> trookat escribió:
>> 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 {content:url(extpic);} 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 class='extico'/></a>
>
> The reason why you can't add the background image to the <a> tag itself
> is... :-?
>
>
>
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

.extlink
{
background-image: url('extlink.png');
background-repeat: no-repeat;
background-position: center right;
padding-right:20px;
}


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

regards trookat

C. (http://symcbean.blogspot.com/)

unread,
Dec 19, 2008, 5:37:24 AM12/19/08
to

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.

C.

Jerry Stuckle

unread,
Dec 19, 2008, 7:24:33 AM12/19/08
to

You'll do better in comp.infosystems.www.authoring.stylesheets (I know
it isn't a very intuitive name!).

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstu...@attglobal.net
==================

trookat

unread,
Dec 19, 2008, 7:48:09 AM12/19/08
to

No small wonder that I could not find a related newsgroup. Thanks Kerry

regards trookat

trookat

unread,
Dec 19, 2008, 8:39:45 AM12/19/08
to

And typos rule he day ! sorry Jerry . I'll just go submit myself to
shock therapy to make sure I check my posts before sending them.

Jerry Stuckle

unread,
Dec 19, 2008, 9:21:11 AM12/19/08
to

No problem!

0 new messages