askwrn Posted January 27, 2016 Share Posted January 27, 2016 (edited) Hello. I have a problem after adding tables to the CMS page. It looks good in wysiwg editor, but when I save a page and open it on a site, I can see <br> added above every table, tr and td tag. In wysiwg code editor and in the database everything looks fine. Can you help me with it? Edited January 28, 2016 by askwrn (see edit history) Link to comment Share on other sites More sharing options...
tuk66 Posted January 27, 2016 Share Posted January 27, 2016 It could be a margin/padding style for table/tr/td tags. Link to comment Share on other sites More sharing options...
tdr170 Posted January 27, 2016 Share Posted January 27, 2016 Make sure when adding tables there are no spaces between <tr> or <td> or it will add a <br /> or a Link to comment Share on other sites More sharing options...
askwrn Posted January 28, 2016 Author Share Posted January 28, 2016 Thanks for replies. I don't think it is a padding or margin style. I can see that table doesn't have any class and it inherits the style from <div>. I think padding or margin won't cause adding <br>. I can see now, that it adds <br> in other places too (as shown on the screenshots I attached to the first post). Any idea where should I find the solution? Link to comment Share on other sites More sharing options...
askwrn Posted February 11, 2016 Author Share Posted February 11, 2016 Sorry for refreshing the topic, but I still haven't found the solution. Does anybody have any idea what to do? Link to comment Share on other sites More sharing options...
tuk66 Posted February 11, 2016 Share Posted February 11, 2016 Post the URL and we can try it online. Link to comment Share on other sites More sharing options...
askwrn Posted February 11, 2016 Author Share Posted February 11, 2016 Here you go: http://tinyurl.com/zbhpfuy Link to comment Share on other sites More sharing options...
tuk66 Posted February 11, 2016 Share Posted February 11, 2016 I think some HTML elements are extra (n bold: <ol> <li> <br> <h3> <img width="30" height="32" alt="" src="http://beta.weglobaldistribution.pl/img/cms/do_pobrania/icons/File_Doc_Text_Word.png"> <a href="http://beta.weglobaldistribution.pl/img/cms/do_pobrania/dokument.docx">przykładowy dokument doc [200kb]</a> </h3> <br> </li> <br></ol><p></p><br><div> <br> <br> <table width="345" cellspacing="1" cellpadding="1" style="height:56px;"></div> Link to comment Share on other sites More sharing options...
askwrn Posted February 11, 2016 Author Share Posted February 11, 2016 I know this:) The thing is that I don't know why there are being added without my intentions. I am using wysiwyg editor in admin panel (preferences / CMS) and it looks ok there, but when I save it, the page on the website has this breaks. Link to comment Share on other sites More sharing options...
tuk66 Posted February 11, 2016 Share Posted February 11, 2016 The wysiwyg editor isn't accurate and sometimes creates unwanted elements. I rather edit HTML code. Link to comment Share on other sites More sharing options...
askwrn Posted February 11, 2016 Author Share Posted February 11, 2016 Yes, but in HTML code everything is fine. There are no <br> there. Breaks are being added only in the website layout for some reason. In admin panel, when editing there are no breaks, they exist only on the webpage. Link to comment Share on other sites More sharing options...
tuk66 Posted February 11, 2016 Share Posted February 11, 2016 How does look the HTML code in database? ps_cms_lang table, content field Link to comment Share on other sites More sharing options...
askwrn Posted February 11, 2016 Author Share Posted February 11, 2016 This is how it looks (looks fine to me): <h1>Materiały do pobrania</h1> <p>Poniżej udostępniamy zbiór materiałów dla naszych partnerów handlowych. Mamy nadzieję, że wśród nich znajdą Państwo wszystkie niezbędne informacje, dokumenty marketingowe oraz materiały graficzne. W przypadku pytań lub potrzeby otrzymania dodatkowych dokumentów, prosimy o kontakt z naszym działem handlowym.</p> <ol><li> <h3><img src="http://beta.weglobaldistribution.pl/img/cms/do_pobrania/icons/File_Doc_Text_Word.png" alt="" height="32" width="30" /><a href="http://beta.weglobaldistribution.pl/img/cms/do_pobrania/dokument.docx">przykładowy dokument doc [200kb]</a></h3> </li> </ol><div> <table style="height:56px;" cellpadding="1" cellspacing="1" width="345"><tbody><tr><td colspan="2" style="width:40px;text-align:center;"><img style="float:left;" src="http://beta.weglobaldistribution.pl/img/cms/do_pobrania/icons/File_Doc_Text_Word.png" alt="" height="32" width="30" /><a href="http://beta.weglobaldistribution.pl/img/cms/do_pobrania/dokument.docx"> przykładowy dokument doc [200kb]</a></td> </tr></tbody></table></div> <table style="width:100%;" cellpadding="1" cellspacing="1"><tbody><tr><td style="width:40px;"><img src="http://beta.weglobaldistribution.pl/img/cms/do_pobrania/icons/File_Doc_Text_Word.png" alt="" height="32" width="30" /></td> <td><a href="http://beta.weglobaldistribution.pl/img/cms/do_pobrania/dokument.docx">przykładowy dokument doc [200kb]</a></td> </tr><tr><td><img src="http://beta.weglobaldistribution.pl/img/cms/do_pobrania/icons/File_ZIP_Archive.png" alt="" height="32" width="30" /></td> <td><a href="http://beta.weglobaldistribution.pl/img/cms/do_pobrania/dokument.zip">przykładowy dokument zip [100kb]</a></td> </tr><tr><td><img src="http://beta.weglobaldistribution.pl/img/cms/do_pobrania/icons/File_PDF_Acrobat.png" alt="" height="32" width="30" /></td> <td><a href="http://beta.weglobaldistribution.pl/img/cms/do_pobrania/dokument.pdf">przykładowy dokument pdf [125kb]</a></td> </tr><tr><td><img src="http://beta.weglobaldistribution.pl/img/cms/do_pobrania/icons/File_JPG_Image.png" alt="" height="32" width="30" /></td> <td>przykładowy obrazek (linka nie wstawiłem)</td> </tr><tr><td><img src="http://beta.weglobaldistribution.pl/img/cms/do_pobrania/icons/File_XLS_Excel.png" alt="" height="32" width="30" /></td> <td>przykładowy arkusz kalkulacyjny (linka nie wstawiłem)</td> </tr><tr><td></td> <td></td> </tr><tr><td></td> <td></td> </tr><tr><td></td> <td></td> </tr><tr><td></td> <td></td> </tr><tr><td></td> <td></td> </tr></tbody></table> Link to comment Share on other sites More sharing options...
tuk66 Posted February 11, 2016 Share Posted February 11, 2016 Linebreaks are converted to <br> and <p></p> tags. Remove them. ...<ol><li><h3><img src="http://beta.weglobaldistribution.pl/img/cms/do_pobrania/icons/File_Doc_Text_Word.png" alt="" height="32" width="30" /><a href="http://beta.weglobaldistribution.pl/img/cms/do_pobrania/dokument.docx">przykładowy dokument doc [200kb]</a></h3></li></ol><div>... 1 Link to comment Share on other sites More sharing options...
askwrn Posted February 11, 2016 Author Share Posted February 11, 2016 That was it! Thank you very much! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now