Skip navigation
Currently Being Moderated

Wrong css erases ALL html

Jul 28, 2012 12:40 PM

Tags: #app #web #html #css

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?

 
Replies
  • Liam Dilley
    6,694 posts
    Feb 28, 2012
    Currently Being Moderated
    Jul 28, 2012 4:17 PM   in reply to KT at MediaTrik

    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.

     
    |
    Mark as:
  • Currently Being Moderated
    Jul 28, 2012 5:15 PM   in reply to KT at MediaTrik

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

     
    |
    Mark as:
  • Liam Dilley
    6,694 posts
    Feb 28, 2012
    Currently Being Moderated
    Jul 28, 2012 6:09 PM   in reply to kenneth_rapp

    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.

     
    |
    Mark as:
  • Currently Being Moderated
    Jul 28, 2012 7:43 PM   in reply to Liam Dilley

    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.

     
    |
    Mark as:
  • Liam Dilley
    6,694 posts
    Feb 28, 2012
    Currently Being Moderated
    Jul 29, 2012 4:12 AM   in reply to kenneth_rapp

    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.

     
    |
    Mark as:
  • Currently Being Moderated
    Jul 29, 2012 4:35 PM   in reply to Liam Dilley

    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 . . .

     
    |
    Mark as:
  • Liam Dilley
    6,694 posts
    Feb 28, 2012
    Currently Being Moderated
    Jul 29, 2012 5:30 PM   in reply to drwoodhall

    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?

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points