-
AuthorPosts
-
September 25, 2022 at 8:30 pm #1366280
Hi
weird thing.
In the CSS there is a comment:
/* Navigation */
When i delete this comment, the whole website layout breaks.Comments do nothing and they usually can be removed without any changes cause they are just….comments.
This comment has a red dot in front of it – but this is only visible in the wordpress theme editor.
So i researched and i found that this seems to be a BOM character:
https://github.com/contao/core/issues/6408
https://github.com/jasonsanjose/brackets-sass/issues/200
When i delete the red dot from the CSS my whole website breaks– I have never seen a red dot in my CSS before
– How did it get there? (I was just editing my CSS and did some copy/paste stuff with Notepad++ and yes – i found that there is a UTF encoding with and without BOM but i have no idea how to handle that in this particular use case )
– How do i get rid of it without breaking my layout?In this state i can not work since i have to copy that miracolous comment from a backup and i am not sure if it stays like that or whatever.
regards
evaSeptember 26, 2022 at 9:10 am #1366304Hey evas49,
Thank you for the inquiry.
Which css file are you editing? We may need to see a screenshot or get access to the dashboard. Please provide the login details in the private field.
Best regards,
IsmaelSeptember 26, 2022 at 12:09 pm #1366332Hi
– I would not edit any CSS except the childthemes CSS. I copied some parts from the parents CSS, edited and pasted it into the childCSS. This might be the way the BOM charakter came from.
– The screenshot would not show you anything else than you can see here:
https://user-images.githubusercontent.com/17183426/29214009-8ee42b8e-7e9d-11e7-9902-7945e149adfd.png
Except that the red dot is in front of the comment.
Like this:
DOT/* Navigation */best regards
evaSeptember 27, 2022 at 9:32 am #1366485Hi,
Thank you for the screenshot.
Which editor are you using, or which editor did you copy the code from? You might have copied something else other than css code. Try to remove the code, open the css on a different editor, copy it then paste it to the editor. Or open the file via FTP, then edit it in your IDE. You can also delete the file entirely via FTP and upload a modified one without the unwanted char.
Best regards,
IsmaelSeptember 28, 2022 at 4:49 pm #13667491: Answer to your question: in my first post.
2: Your suggesteions dont work
-: When i follow your advice with creating it from scratch in annother editor …the layout breaks
-: When i open the file via FTP and edit the line or delete the line (plus the line above and below to make sure) .…the layout breaksits always the same:
When i delete the BOM (whatever way)….the layout breakseva
September 29, 2022 at 8:34 am #1366839Hi,
Please provide a copy of the file or use pastebin.com. We will try to create a copy of it using our editor and send it back. Not really sure what is going on there. Have you tried using a different editor?
You can also leave the css file as it is and create another file with the same css code. You can also place your css modifications in the Quick CSS field.
Best regards,
IsmaelOctober 4, 2022 at 12:37 pm #1367560Hi,
You dont need the whole file.
You only need the part thats problematic
Here it is – copied directly from the WP-Editor under wp-admin/theme-editor.php?file=style.css&theme=enfold-child :.html_header_top.html_header_topbar_active.html_header_sticky #top #main { padding-top: 166px;} /* Navigation */ #header_main .logo{ position:relative; }
eva
PS: I can tell you what will happen – cause i did it already several times:
– You will not find the special character (or when you do you will remove it)
– You send the “clean code” back.
– I will paste it into my CSS
Layout will be broken.Remember:
The problem IS NOT that THERE IS this special character.
The problem is that the layout breaks when i DELETE the special characterOctober 4, 2022 at 1:59 pm #1367568Hey,
Please copy the content of your style.css file and paste it into Notepad++ and refer to this post – https://stackoverflow.com/a/8432691 to save it without BOM. Then replace that style.css file with the one you have on your child theme.
Regards,
Yigit -
AuthorPosts
- The topic ‘Removed comment -Layout broken’ is closed to new replies.