DIV with no content in it.
-
- New Member
- Posts: 7
- Joined: Mon Apr 12, 2010 2:26 pm
DIV with no content in it.
Hi,
I'm new to CMS and this is probably a noob question.
I'm placing a DIV in my page with no content in it:
(this is a 1pixel line with repeat-x).
It does not show anything in my browser.
When I use:
xxx
It shows the line properly but with the XXX in it. (wich I dont want).
Does anybody know why this CMS can't show a div with no content?!
I'm new to CMS and this is probably a noob question.
I'm placing a DIV in my page with no content in it:
(this is a 1pixel line with repeat-x).
It does not show anything in my browser.
When I use:
xxx
It shows the line properly but with the XXX in it. (wich I dont want).
Does anybody know why this CMS can't show a div with no content?!
Re: DIV with no content in it.
Hi, you have to set height for the div id declaration, for example "height:1px".
-
- New Member
- Posts: 7
- Joined: Mon Apr 12, 2010 2:26 pm
Re: DIV with no content in it.
This is the CSS for the #line div:foox wrote: Hi, you have to set height for the div id declaration, for example "height:1px".
#line {
background-image:url(images/line.png);
background-repeat:repeat-x;
width:400px;
height:6px;
margin:20px 0;
}
Re: DIV with no content in it.
This isn't a CMS issue, it's a CSS/XHTML/Browser issue. Make sure you validate your page and if that doesn't work feel free to check out other forums that may be able to help you.
If all else fails, use a bigger hammer.
M@rtijn wrote: This is a community. This means that we work together and have the same goal (a beautiful CMS), not that we try to put people down and make their (voluntary) job as difficult as can be.
Re: DIV with no content in it.
Hi
TinyMCE clears empty divs. I do not know how to turn off this feature. If I need to add the empty div to content I use an image of one transparent pixel:
vilkis
TinyMCE clears empty divs. I do not know how to turn off this feature. If I need to add the empty div to content I use an image of one transparent pixel:
Code: Select all
<div class="clear"><img src="images/sep.gif" alt="" width="1" height="1" /></div>
Re: DIV with no content in it.
Good catch Vilkis, I never thought of that possibility.
I know why Tiny does it (to clean up rogue code from inexperienced editors), but it sure is annoying for developers like us.
I know why Tiny does it (to clean up rogue code from inexperienced editors), but it sure is annoying for developers like us.
If all else fails, use a bigger hammer.
M@rtijn wrote: This is a community. This means that we work together and have the same goal (a beautiful CMS), not that we try to put people down and make their (voluntary) job as difficult as can be.
Re: DIV with no content in it.
Adding may stop it from eating an empty div...
Re: DIV with no content in it.
I am posting this option under the assumption that everyone knows we cannot and will not support hacked installations.
Because of editors copy/pasting content, I don't think we will want to make this default in CMSMS.
Looks like we need to edit the extended_valid_elements call.
http://wiki.moxiecode.com/index.php/Tin ... d_elements
So it looks something like: extended_valid_elements : "div[align<center?justify?left?right|class|id|style]"
This isn't 100% correct for this setup and I haven't read the documentation through. But it's a good starting point for someone.
Because of editors copy/pasting content, I don't think we will want to make this default in CMSMS.
Looks like we need to edit the extended_valid_elements call.
http://wiki.moxiecode.com/index.php/Tin ... d_elements
So it looks something like: extended_valid_elements : "div[align<center?justify?left?right|class|id|style]"
This isn't 100% correct for this setup and I haven't read the documentation through. But it's a good starting point for someone.
If all else fails, use a bigger hammer.
M@rtijn wrote: This is a community. This means that we work together and have the same goal (a beautiful CMS), not that we try to put people down and make their (voluntary) job as difficult as can be.
Re: DIV with no content in it.
yeah - but only till first eding of the page - " " is getting " " in tyni - and " " is like nothing and the next time the div is goneDr.CSS wrote: Adding may stop it from eating an empty div...
Re: DIV with no content in it.
That works. You can paste it in TinyMCE -> Advanced -> Extra configuration .. I don't see how that would make CMSMS itself hacked.
Good tip Tyman!
Esteban: One way to do it is to style "hr" tag as wanted as it would be easily added with editor. You can add that "hr" to toolbar by putting hr separated with comma like others.
Good tip Tyman!
Esteban: One way to do it is to style "hr" tag as wanted as it would be easily added with editor. You can add that "hr" to toolbar by putting hr separated with comma like others.
Re: DIV with no content in it.
You are right! I should have payed more attention to that tab. I was thinking one would have to modify the config file in the TinyMCE module folder.KO wrote: That works. You can paste it in TinyMCE -> Advanced -> Extra configuration .. I don't see how that would make CMSMS itself hacked.
If all else fails, use a bigger hammer.
M@rtijn wrote: This is a community. This means that we work together and have the same goal (a beautiful CMS), not that we try to put people down and make their (voluntary) job as difficult as can be.
-
- New Member
- Posts: 7
- Joined: Mon Apr 12, 2010 2:26 pm
Re: DIV with no content in it.
Thanks!
It worked with the transparent 1px png!
Gratitude.
It worked with the transparent 1px png!
Gratitude.