• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
Locked
0

Wrong css erases ALL html

New Here ,
Jul 28, 2012 Jul 28, 2012

Copy link to clipboard

Copied

Using Firefox today in a webapp template.  When I put incorrect syntax of css in a style tag of div (I know, how could I?) it erased ALL the html!!  Wow.  That will teach me to learn my css. 

Seriously, can someone check this?

TOPICS
Web apps

Views

1.1K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

LEGEND , Jul 29, 2012 Jul 29, 2012

IE is crap, pure and simple so you need to be aware of it.


To many people, I see all the time here too for example have issues with styles, layouts and browsers. The first problem is that the code and sites are not in web standards, full of errors of validation, not well formed, inline/external javascript and CSS all over the place, one thing done one way in one place and very different the next. Even being an expert then finding the issue is mamoth task.

If your HTML and CSS in malformed peoples

...

Votes

Translate

Translate
LEGEND ,
Jul 28, 2012 Jul 28, 2012

Copy link to clipboard

Copied

Hi there.

You shoukd not really use wysiwyg editors to do code and you shoukd aso avoid doing inline CSS like that.

That's not really CSS.

The edit will not deal with incorect HTML and CSS very well, it will try fix it up if it's not correct.

Good CSS is external stylesheets where one change will effect all instances throughout a site.

There are also plenty of free and paid coding apps out there for mac and PC that have all the tools and features to help with the coding, code highlitng and more.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jul 28, 2012 Jul 28, 2012

Copy link to clipboard

Copied

Hi Liam,

Yes, I am perfectly aware of style sheets etc.  Nevertheless, when I am working on a "look," and need to just tweak something, I do consider it a bug when it erases ALL the html if the css is not what it is looking for.  It used to be that it would just delete the offending css statement. 

Katie

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Jul 28, 2012 Jul 28, 2012

Copy link to clipboard

Copied

I'm curious, what was the css that caused this to happen?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jul 28, 2012 Jul 28, 2012

Copy link to clipboard

Copied

Won't be the CSS, it will be that it was not closed off or style was spelt wrong or a > knocked off and on save th editor tried to fix it up.

Katie, won't be a bug, just that inline editors are not the place to do coding in, if there is an error they will just apply logic to try make them valid.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Jul 28, 2012 Jul 28, 2012

Copy link to clipboard

Copied

With all due respect Liam, It may not technically be a bug but the logic has to count for a flaw. The editor sometimes wrecks valid markup as well... I've tried to put inline javascript into the thing and it added page break tags to it. I've seen it delete my notations. No other inline editor i've used (and i've been using them since the glory days of Geocities) has had the issues with affecting markup that this one does. You can't blame people for expecting to be able to code when they're offered a choice between the 'wysiwyg' panel and the code view panel in the editor.

At the very least, it could highlight the offending line, point out the percieved error and give someone a chance to fix it first?

LiamDilley wrote:

Won't be the CSS, it will be that it was not closed off or style was spelt wrong or a > knocked off and on save th editor tried to fix it up.

Katie, won't be a bug, just that inline editors are not the place to do coding in, if there is an error they will just apply logic to try make them valid.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jul 29, 2012 Jul 29, 2012

Copy link to clipboard

Copied

I never really code in the editor or have inline javascript in places that would be edited in the editor because that is generally bad practise but the odd time I seen that its not removed scripts or comments. It is run on XHTML doctype and while it has bugs and has had bugs in general most of the mess up is due to invalid markup. It does not do a very good job dealing with it when that happens, true! but it normally is fine if the markup has not got something a bit wrong with it.
Pretty much when you get into web development you read and see, just as people say when writing online content as well that you never do it in these editors.

Because you can jump off a cliff and there may be even a sign saying "Jump here" Does not mean you do hey

Yep the editor is not the best out there but I defiantly have seen many online editors mess up things, especailly trying to code in them.

Considering there is some free coding apps as well as paid out there I personally do not understand why you would try to code in these anyway.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jul 29, 2012 Jul 29, 2012

Copy link to clipboard

Copied

Coming from a novice, I find that writing the simple doctype at the top ala HTML 5, and having Dreamweaver do its W3 validation thing usually points out my errors.  More and more, I find what you are saying to be completely true, Liam.  Pure coding may be the closest thing to being on the road toward good results . . . . HOWEVER, IE still messes me up sometimes.  For example, of all the browsers, it was the only one recently to render my footer under the content portion of a page.  not under the way I wanted it to, under ala z levels.  It was weird.  Couldn't figure it out, and still haven't.  Magically, however, the next day it didn't anymore.  It is the unexplained and mysterious that I still struggle with , be it HTML, CSS, whatever . . .

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jul 29, 2012 Jul 29, 2012

Copy link to clipboard

Copied

LATEST

IE is crap, pure and simple so you need to be aware of it.


To many people, I see all the time here too for example have issues with styles, layouts and browsers. The first problem is that the code and sites are not in web standards, full of errors of validation, not well formed, inline/external javascript and CSS all over the place, one thing done one way in one place and very different the next. Even being an expert then finding the issue is mamoth task.

If your HTML and CSS in malformed peoples sites then rely on the browser rendering them. Firefox does a very good job of thinking what things should be and sorting them out so people wont know the issues, even with some javascript errors it can carry on.

Missing a ; and chrome and firefox will be fine but IE halts on all errors, which in some ways is good for that. But HTML badly formed it falls over.

Doing web standards, coding good CSS, knowing really well what your doing, just like in any job from plumber to electrician then all you then have to think about it what are the IE bugs.

I know hiding form elements and trying to run javascript will have issues in older IE browsers due to bugs, I know 7 does not clear properly with clearfix still so you need to do certain things. I know that a z-index will not work unless you apply it to the parent elements as well in 7.

My IE only stylesheets are quite small these days because of these principles.

It is not about being "I am better then you" But if you follow web standards, good code, best pracatace etc you just have less problems and the perfomance of sites you build increase.

Using code editors that not only quick populate your code, easy to follow and look at and provide the tools you need means you get the job done correctly and effeciently.

It is like having the job to saw wood. You got a guy trying to do it on his lap, or the guy using the bench and clamp. Just because you can do it both ways, which gets the better cut and is less hassle and also safer?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines