Join a conversation, pose a question, or help a fellow user: The best place to discuss all things Karelia.
You are not logged in.
Pages: 1
I'm migrating a custom design from SV 1.6 to SV 2.2, and have come across a number of incompatibilities. All but one are "correctable" in CSS, but the remaining one is HTML.
Sandvox 2.2 injects a "<br />" element immediately after the first (unnamed) "<div>" block, within a "RichTextElement" div:
<div class="RichTextElement">
<div>
(... content ...)
</div>
<br />
</div>This is adding unwanted space at the bottom of the page
Is this "br" tag intentional?
I can't find that it's coming from any template, so presume it's generated from w/in SV code.
"br" elements are normally not "styleable", but I've found 2 that do work in Safari:
div>br { display:none; }... and
div>br { content:" "; }However, I would prefer not to use either for fear of "other" browser incompatibility.
Is there any way I can disable inclusion of this "<br />" tag?
Sean
Offline
Hello,
When faced with a text area that doesn't end in a paragraph, Sandvox 2 tacks on a <BR> tag, primarily so that you can still click somewhere to append more text.
What precisely are those <div> elements for? Under normal circumstances, Sandvox 2 only allows there to be paragraphs or objects directly inside the a text element like that.
Offline
Hi Mike:
Sorry about the delayed reply, had to do some testing to figure out what's going on.
... What precisely are those <div> elements for?
I don't know, they are generated by Sandvox. eg, creating a simple 1-line "Text" page generates this:
<div class="RichTextElement">
<div>
<p>A simple text sentence</p>
</div>
</div>When faced with a text area that doesn't end in a paragraph, Sandvox 2 tacks on a <BR> tag, primarily so that you can still click somewhere to append more text...
Yes, I see how it works now.
Starting with the above simple "Text" page, I turned it into a collection (no <br /> added), then inserted a "Titles & Summaries" index (again no <br /> added), but by default the index inserts ABOVE the text.
As soon as I move the index BELOW the text, the <br /> IS added, resulting in unnecessary & unwanted extra space at the bottom of the main-content block.
The majority of my old "Indexed Collections" from SV 1.x are of this structure, so when migrated they all receive this added <br />.
For now I'll have to hope that "display:none;" works across browsers.
Perhaps in the future you could make it a named "<P>" tag, so that it could be collapsed/hidden in a cross-browser CSS compliant manner?
Thanks! Sean
Offline
Ah yes, I see which <div>s you mean now – there's so many of them in the HTML you see!
I can confirm that we only add the <BR> tag if the text area ends in an object, rather than text. display:none is supported in all browsers. Note that the rule div>br:
* Won't work in IE6 (probably not a concern!)
* Affects all line breaks inside of <DIV>s. There may be others elsewhere on the page you care about
Perhaps a better rule would be to get a little more specific:
.RichTextElement>div>br { display:none; }
Offline
Thanks Mike!
Perhaps a better rule would be to get a little more specific:
.RichTextElement>div>br { display:none; }
That is how I specified it. Works & doesn't seem to impact anywhere else.
Meanwhile, I discovered a workaround that eliminates the <br />
1) create a dummy paragraph after the normal text content above the Index object.
2) move the Index up in-between the dummy paragraph & normal text content
3) delete the dummy paragraph
Somewhere, in step 2 or 3, the <br /> is eliminated, removing the extra line space.
Sean
Offline
Pages: 1