Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Montezuma Theme (http://forum.bytesforall.com/forumdisplay.php?f=53)
-   -   [SOLVED] preformatted text not placed where should be (http://forum.bytesforall.com/showthread.php?t=23433)

esbrinartot Mar 5, 2016 01:41 PM

[SOLVED] preformatted text not placed where should be
 
I'm have a problem with the preformatted text. Happens what you can see in the next image:

http://i.imgur.com/4KV6GD4.png


http://i.imgur.com/4KV6GD4.png[

This happens with Firefox and Chrome. Any suggestion to fix this problem.

juggledad Mar 5, 2016 06:24 PM

What's the url?
Please export your Montezuma settings and attach them to a reply

esbrinartot Mar 6, 2016 02:07 AM

1 Attachment(s)
Hi Juggledad

URL is next:
http://geekland.eu/redimensionar-y-c...lotes-en-xfce/

Here you can find the settings.
Attachment 2737

More information that can be useful:

- I'm using the versión 1.2.8 of montezuma theme
- I'm using the last version of wordpress 4.4.2

As far as I remember I always had this problem with Firefox and never with Chrome. Now I have the problems in both of them (Desktop version).

With mobile devices I checked it with Safari in iOS 7.1.2 and I don't have the problem. With chrome I don't have it and With Firefox I have the problem. If this infomration is valuable for you I can check other browsers

Regards

juggledad Mar 6, 2016 05:23 PM

The <pre> tag defines preformatted text.

Text in a <pre> element is displayed in a fixed-width font (usually Courier), and it preserves both spaces and line breaks.

It seems that it was not working properly before and now it is.

If you want that text to wrap you could change the <pre> to <p>

esbrinartot Mar 9, 2016 04:07 AM

1 Attachment(s)
Hi

If I use p instead of pre I obtained the next result:

Attachment 2740

As you can see grey square disappears and typography (letters) are also different. Is there any way to fix that?

In addition I know how to apply the changes one by one, but what I would need is Apply the changes to the theme and fix all the problems in 1 action. Do you know where I should go to do that?

juggledad Mar 9, 2016 04:46 AM

Quote:

As you can see grey square disappears and typography (letters) are also different. Is there any way to fix that?
currrently you have this CSS (very bottom of 'custom.css')
HTML Code:

pre {
    border: 1px dashed #cccccc;
    padding: 10px;
}

you need to change it to
HTML Code:

p, pre {
    border: 1px dashed #cccccc;
    padding: 10px;
}

Quote:

In addition I know how to apply the changes one by one, but what I would need is Apply the changes to the theme and fix all the problems in 1 action. Do you know where I should go to do that?
There is nothing in the theme that will do this. How do you go about creating the boxes around the code? You might look for a plugint that would allow a global change or you could export the database and try a global change then re import it (BACK IT UP FIRST)

esbrinartot Mar 9, 2016 08:12 AM

Thks again for your reply

I checked all the CSS files inside the montezuma options and I can't find the file custom.css

Even I checked file by file like for example various.css, cleafix.css.... etc and I can't find any sentence like the one you mentioned. I also checked all the files css files in the security copy and I can't find it.

So where the problem that I have now is to find out where is the location of the file to modify.

Then According your reply means that each time that I use preformatted text with the wordpress editor I will have to modify the code... This doesn't seem so practic.

Regards and thks

juggledad Mar 9, 2016 09:36 AM

Ahhh fumble brain it's content.css not custom.css (need more coffee....)

Quote:

Then According your reply means that each time that I use preformatted text with the wordpress editor I will have to modify the code... This doesn't seem so practic.
Themes don't control the wordpress post editor. If you use <pre>....</pre> in your post, then teh browser interperates it not the theme. What is interesting is that Safari will treat the contents of <pre>....</pre> like you want - i.e. the chile elements stay inside the pre element - but FireFox and Chrome seem to adhear to the strict interpretation of how <pre. should work.

esbrinartot Mar 9, 2016 09:57 AM

1 Attachment(s)
The solution that you propose I see that have some issues. Typography it's not the correct one

Attachment 2741

One typography seems courier. When you replace pre by p then it's not courier.

In addition if you replace pre by p then if you write "--list" the result is "-list"

So if you write commands or code... this solution is not suitable.

esbrinartot Mar 9, 2016 10:02 AM

and if I do CSS modification that you propose then when you write bold letter then you also have the square... so this is not a good solution for me.

To fix the problem maybe we should add properties like

margin-right: 10px;
margin-left: -20px;

Inside the content.css

esbrinartot Mar 9, 2016 10:24 AM

Hi

the problem is fixed.

What works for me is next.

HTML Code:

pre {
        padding:                                10px;
        border:                                dashed 1px #cccccc;
          white-space:                          pre-wrap;
}

If you do this the content displays perfect in any browser.

juggledad Mar 9, 2016 10:50 AM

Good to know, I haven't seen 'white-space' before. You learn something new every day!


All times are GMT -6. The time now is 10:00 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.