Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 8 of 8
  1. #1
    New to the CF scene
    Join Date
    Dec 2007
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    WTF, messed up coding, batman!

    I have a very messed up code in my site. I have NO IDEA how it happened, so therefore I am rather clueless as to what I need to fix.

    I'm assuming you guys have a great knowledge of coding, or at least better than mine, so I was hoping you could check it out.

    This is my site:

    http://helpmemeetjoejonas.com/index/

    [I will remove it once issue is resolved].

    As you can see, the text is..under where it's supposed to be. I stared at the screen for a good 5 minutes with a "BUH?" expression, ahah. Please help!

  • #2
    The fat guy next door VIPStephan's Avatar
    Join Date
    Jan 2006
    Location
    Halle (Saale), Germany
    Posts
    8,629
    Thanks
    6
    Thanked 1,002 Times in 975 Posts
    If something is screwed up, obviously there must be an error in the code or a wrong implementation. Your first thought should be to consult the W3C HTML validator. The next consultation after you’ve fixed your tremendous amount of errors (and you should always validate against strict rules) should be the W3C CSS validator.

    If it’s still screwed up then, read on semantic HTML and how to clean up deprecated and/or misused HTML to achieve cross browser compatible website layouts. Due to the fact that Wordpress itself comes with pretty clean, semantic, and valid code by default it kinda hurts me to see it abused so bad.

  • #3
    Senior Coder
    Join Date
    Jan 2005
    Location
    Memphis, TN
    Posts
    1,785
    Thanks
    8
    Thanked 131 Times in 129 Posts
    might i suggest "tidy html" for firefox.

    dont use it to clean your code but use it from the top down and figure out one mistake. usually thats all it takes.
    Stop making things so hard on yourself.
    i is tugbucket :: help raise tugburg :: Whitehaven Kiwanis

  • #4
    The Apostate Apostropartheid's Avatar
    Join Date
    Oct 2007
    Posts
    3,215
    Thanks
    16
    Thanked 265 Times in 263 Posts
    Meh, validator generally screams at you when you haven't closed an element anyway.

    Personally I never use stuff like HTML Tidy because nothing beats good hand-coding. Getting a computer to do it for you seems wrong, imo--and there's only so far it can go.

  • #5
    New to the CF scene
    Join Date
    Dec 2007
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Um, okay.

    I was hoping someone could check the coding for me. Because like I said, I'm CLUELESS. I would just screw it up worse. Can anyone tell me specifically what is wrong and specifically what should be changed, and what it should be changed to? Thanks.

  • #6
    The Apostate Apostropartheid's Avatar
    Join Date
    Oct 2007
    Posts
    3,215
    Thanks
    16
    Thanked 265 Times in 263 Posts
    It pretty much all goes wrong after Line 363, Column 174, where you've not ended a tag. The rest is pretty much all XML parsing errors. Most of the errors are due to using deprecated (X)HTML: font is no longer permitted, the align attribute went boom when CSS was introduced and guy that came up with no borders on HTML tables should probably be shot. A lot of your tags aren't closed, and the embed element never even existed.

    All in all, you're just gonna have to learn clean, semantic HTML + CSS properly and throughly, then you're probably gonna have to rebuild it from the bottom up. It's the best idea, in this case.

  • #7
    Regular Coder
    Join Date
    Jul 2002
    Location
    Kansas, USA
    Posts
    487
    Thanks
    0
    Thanked 54 Times in 53 Posts
    Corina

    locate this bit of code
    Code:
    </TD></TR></TABLE>
    <!-- end sidebar -->
    and change it to this
    Code:
    <!-- </TD></TR></TABLE> -->
    <!-- end sidebar -->
    then locate this bit of code which is immediately below it
    Code:
    <div style="width:614px; text-align:left; height:700px;">
    <!-- end header -->
    and change it to this
    Code:
    <div style="width:614px; text-align:left;">
    <!-- end header -->
    I believe this fixes the issue in IE and Firefox, unless you can point something else out.

  • #8
    The fat guy next door VIPStephan's Avatar
    Join Date
    Jan 2006
    Location
    Halle (Saale), Germany
    Posts
    8,629
    Thanks
    6
    Thanked 1,002 Times in 975 Posts
    We’re certainly here to help but we’re not here to do other peoples’ job. The first help we usually offer is giving advice on how to help yourself.

    OK, maybe a simple link to the validator isn’t enough but before you start developing websites you should know what you do anyway (e.g. know what XHTML is and the difference to classic HTML, and what and why to choose one over the other, know what semantic HTML is and why that’s the key to working websites, etc.).

    Here’s a short rundown:

    If you are using/writing XHTML:
    • All tags must be lowercase, i.e. <div> instead of <DIV>
    • All attribute values must be enclosed by single or double quotation marks, i.e. <div id="example"> instead of <div id=example>
    • All elements must be properly closed. Elements without an equivalent closing tag should be closed with the shortcut slash, i.e. <br />, <img … />, <input … />, etc. instead of <br>, <img …>, <input … />, etc.
    • All elements must be correctly nested, i.e. <div><a>text</a></div> instead of <div><a>text</div></a>


    These are the most errors you’ve got while the last rule above is the one that usually screws up things in good browsers.

    Besides that your code is somewhat of a mess as you’re mixing structural and presentational markup along with deprecated elements. At first you should write strictly conformant markup (a.k.a. (X)HTML strict) where things like <font> and <center> are not allowed because these are purely presentational elements that should be replaced by CSS.

    Note:
    1. HTML is just for the structure, CSS is just for the presentation (layout, colors, position, sizes, etc.)
    2. Tables are not for layout! They should contain and represent tabular data, not create any presentational effects (see point one).


    This might all sound a little much at the moment but the thing is: Any kind of fixing we/you would do would just be scratching on the surface while the basic problems of that site continue to exist and will eventually come up again if you’re adding and/or changing anything. So the only real help I am able/willing to give is the one above, i.e. help to help yourself. After you have fixed and cleaned up everything so that the basic issues are out of the way we can take care of little inconsitencies that hinder it from working equally if you need help.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •