4 replies [Last post]
CSSelgreco1965
CSSelgreco1965's picture
Offline
Enthusiast
Greece
Last seen: 8 years 33 weeks ago
Greece
Timezone: GMT+3
Joined: 2004-06-13
Posts: 51
Points: 28

I found a technique for including plaintext files on the website using PHP, but you have to have the "pre" tags in place to get the line breaks. The issue is that no matter how many times I change attributes for this tag in CSS none of them work.

Does anyone have any clues?

Thanks

The web becomes a tangled mess when Microsoft gets involved!

Daybreak_0
Offline
Enthusiast
Sydney, Australia
Last seen: 16 years 4 weeks ago
Sydney, Australia
Timezone: GMT+10
Joined: 2003-11-15
Posts: 389
Points: 0

<pre> tag doesn't change with CSS

Can you place span tags inside the Pre tags around all the text - if so give the span tags a "class" and then try applying css against the class.

I am not sure, but as pre is for pre-formatted text, maybe you can not apply css against the pre tag. I do know you can have
<pre><b>test bold</b> and not bold</pre> and it works, which led to my suggestion above.

good Luck
Day

The only way to learn is to do it yourself

CSSelgreco1965
CSSelgreco1965's picture
Offline
Enthusiast
Greece
Last seen: 8 years 33 weeks ago
Greece
Timezone: GMT+3
Joined: 2004-06-13
Posts: 51
Points: 28

&lt;pre&gt; tag doesn't change with CSS

Tried the tags inside too and nothing. What does work is if you use full blown HTML tags inside the pre as you said, which begs me to wonder why CSS class tags don't work.

Thanks anyway.

The web becomes a tangled mess when Microsoft gets involved!

Stu
Stu's picture
Offline
Enthusiast
Bristol uk
Last seen: 15 years 47 weeks ago
Bristol uk
Joined: 2004-01-20
Posts: 282
Points: 0

&lt;pre&gt; tag doesn't change with CSS

There is no reason why you should not be able to format pre tags using css.
You should be able to format font, size, color etc.

css

pre {font-family:verdana, sans-serif; font-size:0.8em; color:#c00;}

It's not what you do it's the way that you do it.
So do it with STYLE
http://www.s7u.co.uk

Daybreak_0
Offline
Enthusiast
Sydney, Australia
Last seen: 16 years 4 weeks ago
Sydney, Australia
Timezone: GMT+10
Joined: 2003-11-15
Posts: 389
Points: 0

&lt;pre&gt; tag doesn't change with CSS

best to give us a link so we can see the code

Regards
Day

The only way to learn is to do it yourself