Solved

Html - invisible <br style><p></p> showing up in chrome debug

Posted on 2010-09-20
13
248 Views
Last Modified: 2012-08-13
Hi, if you visit this link:  http://marckandalaft.com/index.php?k=MK

there is a bit wider of a gap between the submenu and the content section than i want.  You will notice the wider gap if you compare it to any other section in the site.

If you analyze the page in google chrome developer - and click into the div's -to highlight them - you will find that the gap is caused by the lines <br style><p></p>.  The problem is that those lines do not exist in the source code - look at the source!  I did a search for <br style> in the .php file and nothing.  

where the heck are those lines coming from?

thanks
0
Comment
Question by:nbj622
  • 7
  • 6
13 Comments
 
LVL 82

Expert Comment

by:Dave Baldwin
ID: 33721363
Your javascript is adding "<br>  <p></p>" between "<!-- START MK SECTION -->" and '<table width="100%">'.  If you have Firefox Web Developer, use "View Generated Source" to see it.
<!-- START MK SECTION -->	                
  
        
       		<br>
                            
		                    <p></p><table width="100%">

Open in new window

0
 

Author Comment

by:nbj622
ID: 33721402
i just deleted the block of javascript and all the whitespace right after<!-- START MK SECTION --!> between <table...> -   the problem is still there wtf?!
0
 

Author Comment

by:nbj622
ID: 33721445
this is the snippet from the php file - notice nothing comes after <!-- START MK SECTION -->

---------------------------

<!-- END PHOTOGRAPHY SECTION -->      

<?php }else{ ?>



                                                <!-- START MK SECTION --><table width="100%">
                            <tr>
                       
                       


0
 
LVL 82

Expert Comment

by:Dave Baldwin
ID: 33721461
Right under "Maria Lund" you have a broken <div , no '>'.
<!-- Maria Lund -->	                

 <div class="block2"

Open in new window

0
 
LVL 82

Expert Comment

by:Dave Baldwin
ID: 33721489
I know you won't find anything in the PHP file.  It is being done by one of the javascripts on the page.  That's why you see it in the 'DOM' view and not the source.  I just can't tell which one it is yet.
0
 

Author Comment

by:nbj622
ID: 33721510
thx for the broken div info - fixed.
0
Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

 
LVL 82

Expert Comment

by:Dave Baldwin
ID: 33721522
You have "<div id="publications">" in more than one place.  'id' should be unique.  'class' can be repeated.  In addition, there is "<p></p>" in the DOM source before "<div id="publications">" when in the original source it is "</p><p>".  Some javascript is rearranging things I think.
0
 

Author Comment

by:nbj622
ID: 33721685
i fixed all of the publications and <p> and <b> tags within.  the client made a mistake there.  the problem still persists. :(
0
 

Author Comment

by:nbj622
ID: 33721699
im running the validator on it now, i need to clean it up
0
 
LVL 82

Accepted Solution

by:
Dave Baldwin earned 500 total points
ID: 33722820
I had to go to work this evening.  Looks like you have the original problem cleared up but the publications and <p> tags still act different between the original source and the DOM source.  I'll check in in the morning.
0
 

Author Comment

by:nbj622
ID: 33725455
through validating i found the sneaky <br/> - it was hidden between td's right after <!--- Publications Start --> .  the DOM must have slid it back towards the START MK, making it tricky to find using the developer tools. my client introduced a bunch of errors into the file - i should have gone to the validator first.  hey dave thanks for the help and ill award you the points cuz your publications tip was just about right.
0
 

Author Closing Comment

by:nbj622
ID: 33725467
not an exact answer.  very close though.
0
 
LVL 82

Expert Comment

by:Dave Baldwin
ID: 33727154
Thanks, glad I could help.  That would make it hard to find.  I've had those where I accidentally put something in between tags in a table.  It always moves it to just before the table in the DOM.
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

This is a PowerShell web interface I use to manage some task as a network administrator. Clicking an action button on the left frame will display a form in the middle frame to input some data in textboxes, process this data in PowerShell and display…
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
In this tutorial viewers will learn how to position items using CSS's three positioning types Create a new HTML document with an internal stylesheet.: Create another div in CSS and name it Absolute : Type "position:absolute;" and "top:10px; left:50p…
In this tutorial viewers will learn how to embed an audio file in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: : The declaration should display (CODE) HTML5 is supported by the most recent versions of all major browsers…

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now