Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Atahualpa 3 Wordpress theme (http://forum.bytesforall.com/forumdisplay.php?f=2)
-   -   Block width (http://forum.bytesforall.com/showthread.php?t=24088)

extremecarver Apr 17, 2021 10:51 PM

Block width
I know the block width is related to the theme. And somehow this resolves to 540 pixels for me - which is way too narrow.

How can I change the block width to 90%
(this is the width of the text inside the editor, I think it applies to both tinymce aka classic editor and the gutenberg editor).

I created a theme and was able to change the margin left hand side - but not the actual width.

add_filter( 'admin_footer', 'fulleditorwidth', 99 );
function fulleditorwidth() {
echo '<style> #content_ifr { display: block; margin-left: 3px; margin-right: 3px; width: 1900px !important; max-width:none !important;}</style>';

extremecarver Apr 17, 2021 11:19 PM

just to add - this is clearly depending on the theme - because with twenty-one I get a much wider block in the classic editor (and likely also gutenberg, but I only use classic editor)

juggledad Apr 20, 2021 04:43 AM


I created a theme and was able to change the margin left hand side - but not the actual width.
are you creating a new theme? If so, why are you asking about it on the Atahualpa theme forum?

extremecarver Apr 20, 2021 09:06 AM

sorry, meant of course child theme. and the text is in the functions.php
The block width is clearly somewhere in atahualpa, but I don't think it depends on any configurable setting - well at least not documented.
And it's the same width for me if I reset Atahualpa or with my settings. Just don't know this is because atahualpa doesn't have support for something that changed, or if it's configured to be that tiny - 630 pixels more or less... While my site is using 1920 width (depending on actual screen resolution, using the responsive atahualpa css stuff). Of course this only applies to visual view in the editor, html view is full width. i guess width right now is 640 pixels minus margins...

extremecarver Apr 20, 2021 09:39 AM

Edit: no content_width seems to be for Gutenberg? I just set it to 1920 and it changed absolutely nothing... so where is block width...
however there is no other 640 in atahualpa according to google: 640 site:https://github.com/mdmower/atahualpa?

found it - haha should have diretctly looked into the functions.php file and search for width...

// Since 3.6: Content Width
if ( ! isset( $content_width ) )
$content_width = 640;

maybe this is helpfull?

An alternative would be using CKeditor - I used it in the past and it shows full width. However I think I switched back to Tinymce because of some formatting bugs related to empty lines / breaks. Cannot remember... with it not being updated for 6 years it's not the best idea I feel...

extremecarver Apr 20, 2021 11:15 AM

oh I finally found a tutorial that worked, after trying plenty that were not working anymore or plugins that didn't work:


// Style the tinymce editor.
function my_theme_add_editor_styles() {
add_editor_style( 'my-editor-style.css' );
add_action( 'init', 'my_theme_add_editor_styles' );

[css]#tinymce {
max-width: 1640px;

Note however - I do not know why, but this causes full width instead of 1640px. But I wanted full width anyhow...
Actually I think the reason is that my code is wrong - but atahualpa has no editor stylesheet at all, so the tinymce editor falls back to some default stylesheet. As I created a stylesheet, even if wrong - it resets to full width. The important thing is to have a style sheet. I know atahualpa is not really developped anymore - but maybe a basic editor stylesheet should be added? however than my child theme wouldn"t work anymore so maybe better not...

Well the best default behaviour would be - if it"s full width or takes the width from the responsive stuff .i.e.

/* #### small Desktops #### */
@media screen and (min-width: 801px){
tbody {max-width: 1080px; margin: auto;}
div#container {max-width: 1080px; margin: auto;}
table#layout {max-width: 1080px; margin: auto; font-size: 0.80em;}

/* #### HD Desktops #### */
@media screen and (min-width: 1260px){
tbody {max-width: 1250px; margin: auto;}
div#container {max-width: 1250px; margin: auto;}
table#layout {max-width: 1240px; margin: auto; font-size: 0.85em;}

from css inserts..

extremecarver Apr 20, 2021 12:01 PM

oh I was a bit blind - it exists but is a 1:1 copy from Twenty Ten theme, and that was based on 640 pixels....

well maybe that whole thing could be exchanged with the editor style from twenty twentyone for a future version of atahualpa. at least that"s better then what is there right now. But the format changed a bit - so not so easy as just copy paste...

All times are GMT -6. The time now is 12:38 PM.

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