开发者

Tracking nested items in CSS

开发者 https://www.devze.com 2023-04-09 18:31 出处:网络
I\'m going out of my mind trying to figure out where these 4 <br> tags are coming from. The CMS is doing this:

I'm going out of my mind trying to figure out where these 4 <br> tags are coming from.

The CMS is doing this:

<div style="width:100%; border: solid 1p开发者_JAVA技巧x;">
    <br>
    <br>
    <br>
    <br>
    <table style="display:block; width: 99%; height: auto; margin: 0px; vertical-align: top; border: solid 1px;" border="0">
        <colgroup>
        <col style="text-align: left;"></colgroup>
        <colgroup><col style="text-align: center;"></colgroup>
        <colgroup><col style="text-align: center;"></colgroup>
        <colgroup><col style="text-align: center;"></colgroup>  
    <tbody>

The code for the page as it stands goes:

<div style="width:100%; border: solid 1px;">
<table style="display:block; width: 99%; height: auto; margin: 0px; vertical-align: top; border: solid 1px;" border="0">
    <colgroup>
    <col style="text-align: left;"/>
    <col style="text-align: center;"/>
    <col style="text-align: center;"/>
    <col style="text-align: center;"/>
    </colgroup>
  <tbody>  

Now, it seems something in the CMS css code is telling it to put those tags in before the table. The div at the front is going all the way to the top, but as soon as I put in a table those 4 <br> tags come in. I've done my absolute best trying to scour the css for the call off, but to no avail. Is there an easier way of tracking this through the css? All I want to do is force the inline style so there are no more <br> tags above the table.

Thanks for any help!

edit Sorry this is Drupal, with the Chrysalis theme. Can't CSS do before: or after: to add stuff? That's what I was kinda assuming was going on. Also, I don't have access to mess with the external CSS. Just assume I have to respect the current CSS and only make inline changes if neccessary.


It almost definitely isn't the CSS putting those tags in, but some template in your CMS.

Nevertheless, if you just wrap your table in a div with a class, say, 'tablewrapper' and add some CSS like

.tablewrapper br { display: none; }

It should hide the br's on the page.


BNL you are correct, it was the CMS module inserting those. It was the 'Line Break Converter' that was doing this.

Just go to: Administer->Site configuration->Input formats

and disable the 'Line Break Converter'.

It's pretty similar to this: http://drupal.org/node/689908 .
Thanks for getting me back on the right direction.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号