Solved

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

Posted on 2010-09-20
13
252 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 83

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
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 
LVL 83

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 83

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
 
LVL 83

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 83

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 83

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

Are your AD admin tools letting you down?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Are there any non javascript based chart/graph solutions? 14 31
Not seen Link button 5 38
HTML &#0153 2 17
HTML5 Get data in table rows 5 28
Showing your events from Google Calendar in Google Maps Why? I travel all week and I thought it would be ideal if staff in office knew where I was based on my calendar. (OK real reason: my son wanted to see where I would be working, and I thoug…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
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…
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.

770 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