# Bug Quote obscured by advert

1. Jan 15, 2010

### sylas

I have been looking at PF without being actually logged on, and so all the advertisements were in place. And I noticed a problem. I looked through a couple of threads, and it is a consistent problem. Consider this screen shot.

There is a google advertisement, placed inside the first post of the page. The text in post is wrapped appropriately so that it is not obscured by the advertisement. However, the text inside the quote box is not wrapped, so gets partially obscured by the advertisement. Having a border around an advertisement in this position would also be an improvement.

Cheers -- sylas

2. Jan 15, 2010

### Staff: Mentor

You call it a bug? Greg calls it a feature - this way more people want to pay for using forums.

3. Jan 15, 2010

### Greg Bernhardt

It's a bug i've known about for awhile. Not quite sure how to fix it. Only happens when a quote is high enough in a first post. Not too common. thanks!

4. Jan 15, 2010

### Moonbear

Staff Emeritus
:rofl: The truth is finally out.

5. Jan 15, 2010

### DavidSnider

A quick and dirty fix is to put a table in:

so:
Code (Text):

....
<td class="alt1" id="td_post_XXXXX" style="border-right: 1px solid #E3E3E3">
<table>
<tr>
<td>
<div id="message">
...
</div>
</td>
<td>
...
</span>
</td>
</tr>
</table>
</td>
....

6. Jan 15, 2010

### tiny-tim

It's unlikely to happen in a first post, since the first post usually has nothing to quote.

It can of course happen in the 17th, 33rd, etc post … but the reader can always click the little arrow to see the original.

7. Jan 15, 2010

### sylas

I've had a look at the code. The solution is to take a table out! Furthermore, if this is fixed, you will once more be able to place an advertisement inside every post, which I believe was the case previously. So you even get the advantage of more ads to the hoi polloi. (Any hoi polloi reading this: subscribe! You know you want to.)

Quoted text currently uses html where a quote appears inside a div, which is inside a table with a single cell, which is inside a div.

Inside that, you then have another div for the header indicating who is being quoted, and then a blockquote for the quoted text.

The problem is that the table has width 100%, and this is what prevents the stuff inside from properly wrapping around the ad.

There's probably some history of development here, but the fix is to simplify. Get rid of the table, and combine the two outer divs. The table here does nothing useful and only causes the bug.

Here I give a complete example in html, with the original and the revised methods, but all the other guff for the page stripped out. This contains what is effectively a post with two quoted sections, and a floating ad. I put the current method first, and the proposed version after, with headings to say which is which. You can see that the quotes have one div replacing what was two divs and a table, all nested. Observe the difference in the attached screen shot. Margin widths still give the same spacings as at present.
Code (Text):

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "[URL]http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">[/URL]
<html>
<style type="text/css">
.quote {
margin:15px 10px;
background: url([PLAIN]https://www.physicsforums.com/images/misc/q.gif)[/PLAIN] [Broken] 0 0 no-repeat;
.smallfont
{
color: #26353F;
font: 10px verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif;
}
blockquote.bq {
font: italic 10pt verdana, geneva, lucida;
border-left:2px solid #cacaca;
border-right:0px solid #81ba3c;
border-top:0px solid #81ba3c;
border-bottom:3px solid #cacaca;
margin:0px;
</style>
<body>

<h3>Original version</h3>

<span style="margin: 2px; float: right; width: 301px; height: 251px;">
<!-- =================== CODE FOR RECTANGLE  300x250 ============== -->
<!-- sylas commented out the script: <script  src="http://tag.contextweb.com/TagPublish/getjs.aspx?action=VIEWAD&cwrun=200&cwadformat=300X250&cwpid=&cwwidth=300&cwheight=250&cwpnet=1&cwtagid="></script>--><div style="border: 1px black solid; width:300px; height: 251px;">This is text to use in place of the script that calls up something to get hold of an advertisement. The actual add comes with a background color, I think, which obscures the text underneath. I've added a border.</div></span>

<!-- Here is the post -->

<div id="post_message_6666">Prefix<br />
<div style="margin:3px; margin-top:5px; ">
<tr>
<td><div class="quote" style="margin-bottom:2px">
<div class="smallfont" style="margin-bottom:2px">
Originally Posted by <strong>PosterName</strong>
<a href="showthread.php?p=6666#post6666" rel="nofollow"><img class="inlineimg" src="[PLAIN][PLAIN][PLAIN]https://www.physicsforums.com/Prime/buttons/viewpost.gif"[/PLAIN] [Broken] [Broken] [Broken][/URL] border="0" alt="View Post" /></a>
</div>
<blockquote class="bq" style="font-style:italic">This is a bit of quoted text from the post linked just above, with the author indicated just above as well.</blockquote>
</div></td>
</tr>
</table>
</div>This is a response to the first quoted portion, which sets the stage for the next bit.<br />

<div style="margin:3px; margin-top:5px; ">
<tr>
<td><div class="quote" style="margin-bottom:2px">
<div class="smallfont" style="margin-bottom:2px">
Originally Posted by <strong>PosterName</strong>
<a href="showthread.php?p=6666#post6666" rel="nofollow"><img class="inlineimg" src="[PLAIN][PLAIN][PLAIN]https://www.physicsforums.com/Prime/buttons/viewpost.gif"[/PLAIN] [Broken] [Broken] [Broken][/URL] border="0" alt="View Post" /></a>
</div>
<blockquote class="bq" style="font-style:italic">This is another bit of quoted text, but this time it is a bit longer so that it spills over two lines at least.</blockquote>
</div></td>
</tr>
</table>
</div>This is more response from the post, to finish up with an incisive contribution to the discussion that puts the two quoted extracts into context where they are immediately understood by everyone reading.</div>

<h3>Corrected version</h3>

<span style="margin: 2px; float: right; width: 301px; height: 251px;">
<!-- =================== CODE FOR RECTANGLE  300x250 ============== -->
<!-- sylas commented out the script: <script  src="http://tag.contextweb.com/TagPublish/getjs.aspx?action=VIEWAD&cwrun=200&cwadformat=300X250&cwpid=&cwwidth=300&cwheight=250&cwpnet=1&cwtagid="></script>--><div style="border: 1px black solid; width:300px; height: 251px;">This is text to use in place of the script that calls up something to get hold of an advertisement. The actual add comes with a background color, I think, which obscures the text underneath. I've added a border.</div></span>

<!-- Here is the post -->

<div id="post_message_6666">Prefix<br />
<div class="quote" style="margin: 19px; margin-top: 25px; margin-bottom:12px">
<div class="smallfont" style="margin-bottom:2px">
Originally Posted by <strong>PosterName</strong>
<a href="showthread.php?p=6666#post6666" rel="nofollow"><img class="inlineimg" src="[PLAIN][PLAIN][PLAIN]https://www.physicsforums.com/Prime/buttons/viewpost.gif"[/PLAIN] [Broken] [Broken] [Broken][/URL] border="0" alt="View Post" /></a>
</div>
<blockquote class="bq" style="font-style:italic">This is a bit of quoted text from the post linked just above, with the author indicated just above as well.</blockquote>
</div>This is a response to the first quoted portion, which sets the stage for the next bit.<br />

<div class="quote" style="margin: 19px; margin-top: 25px; margin-bottom:12px">
<div class="smallfont" style="margin-bottom:2px">
Originally Posted by <strong>PosterName</strong>
<a href="showthread.php?p=6666#post6666" rel="nofollow"><img class="inlineimg" src="[PLAIN][PLAIN][PLAIN]https://www.physicsforums.com/Prime/buttons/viewpost.gif"[/PLAIN] [Broken] [Broken] [Broken][/URL] border="0" alt="View Post" /></a>
</div>
<blockquote class="bq" style="font-style:italic">This is another bit of quoted text, but this time it is a bit longer so that it spills over two lines at least.</blockquote>
</div>This is more response from the post, to finish up with an incisive contribution to the discussion that puts the two quoted extracts into context where they are immediately understood by everyone reading.</div>

</body></html>

The essential replacement is this only. Replace:
Code (Text):
<div style="margin:3px; margin-top:5px; ">
<tr>
<td><div class="quote" style="margin-bottom:2px">
<div class="smallfont" style="margin-bottom:2px">
Originally Posted by <strong>PosterName</strong>

with
Code (Text):
<div class="quote" style="margin: 19px; margin-top: 25px; margin-bottom:12px">
<div class="smallfont" style="margin-bottom:2px">
Originally Posted by <strong>PosterName</strong>

The last two lines in the above extracts are identical, just given for context. The difference looks like this:

The fix requirements for existing code should be very easy, I think, and it will let you put in more advertisements.

Cheers -- sylas

Last edited by a moderator: May 4, 2017
8. Jan 16, 2010

### GeorginaS

It happens only in the first post in the thread or top of the subsequent pages. Those are the only posts that have adverts in the right-hand corners. That's one reason why I log in every time I wander over here, so I can read the entirety of the top post. But then I miss out on the Physorg links, which I actually liked and didn't mind at all in the second post spot.

But, yeah. No, the adverts messing with the first post when you're not logged in and/or don't have a subscription isn't new.

9. Jan 16, 2010

### Staff: Mentor

Can't be, no more than 3 AdSense frames per page allowed by Google contract.

10. Jan 16, 2010