Solved

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

Posted on 2010-09-20
13
259 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

Why Off-Site Backups Are The Only Way To Go

You are probably backing up your data—but how and where? Ransomware is on the rise and there are variants that specifically target backups. Read on to discover why off-site is the way to go.

Question has a verified solution.

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

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 explains how to prepare an HTML email signature template file containing dynamic placeholders for users' Azure AD data. Furthermore, it explains how to use this file to remotely set up a department-wide email signature policy in Office …
In this Micro Tutorial viewers will learn how to create navigation buttons that change on rollover, using CSS (Continuation of the CSS Image Sprite tutorial) Create a parent ID for all the list items       - Specify position: absolute and display: block…
In this tutorial viewers will learn how to style transparent/translucent elements using alpha transparency in CSS Start with a normal styled element, such as a div.: Define its "background-color" property as "rgba (255, 255, 255, .5): The numbers in…

690 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