CSS display block and line break
Having trouble installing Oxygen? Got a bug to report? Post it all here.
-
- Posts: 52
- Joined: Thu Dec 15, 2011 7:56 pm
CSS display block and line break
Hi,
I use a CSS stylesheet for the Author mode.
When I specify a CSS display:block property to an element, I get line breaks.
One before and one after the block. It's not a margin or padding problem because they are all set to 0.
I suspect the XML indentation... because when I delete (manualy) the indentation between this element and its parent. There's no line breaks any more...
Exemple (copy/paste) :
Is it a known issue ?
Thanks,
Vincent.
I use a CSS stylesheet for the Author mode.
When I specify a CSS display:block property to an element, I get line breaks.
One before and one after the block. It's not a margin or padding problem because they are all set to 0.
I suspect the XML indentation... because when I delete (manualy) the indentation between this element and its parent. There's no line breaks any more...
Exemple (copy/paste) :
Code: Select all
<Comment>
<par>text...</par>
</Comment>
Thanks,
Vincent.
-
- Posts: 515
- Joined: Wed May 20, 2009 2:40 pm
Re: CSS display block and line break
Hi Vincent,
The line breaks appears in Author mode, right?
I understand that you have the CSS display:block property set for par element. What is the display property value for its Comment parent element (inline or block)?
Regards,
Mihaela
The line breaks appears in Author mode, right?
I understand that you have the CSS display:block property set for par element. What is the display property value for its Comment parent element (inline or block)?
Regards,
Mihaela
Mihaela Calotescu
http://www.oxygenxml.com
http://www.oxygenxml.com
-
- Posts: 52
- Joined: Thu Dec 15, 2011 7:56 pm
Re: CSS display block and line break
Exactly, it appears in the Author Mode.
The parent element is also with CSS display:block property.
But I've tried with inline, inline-block, and without the property... it's still the same.
If I delete manually the indentation in Text mode to get something like that :
The line breaks disapear... !
Is it possible to add/delete easily the indentation ?
I mean, a button or something which can switch between with or without indentation in my xml file.
Thanks a lot Mihaela !
Vincent.
The parent element is also with CSS display:block property.
But I've tried with inline, inline-block, and without the property... it's still the same.
If I delete manually the indentation in Text mode to get something like that :
Code: Select all
<Comment><par>text...</par></Comment>
Is it possible to add/delete easily the indentation ?
I mean, a button or something which can switch between with or without indentation in my xml file.
Thanks a lot Mihaela !
Vincent.
-
- Posts: 515
- Joined: Wed May 20, 2009 2:40 pm
Re: CSS display block and line break
Hi Vincent,
I suspect that the Comment element is a space-preserve element. In this case all the white spaces are presented in its content, in Author mode.
You can check if the element has a space-preserve content by pressing ENTER inside the element content. If the content completion menu contains the ENTER (line break) entry means that the element is a space-preserve one.
The element can be declared as space-preserve in the associated CSS (if the white-space property has pre value) or in the document schema (you can check the Model view to see the Whitespace property value). Also, an element can be declared as preserve space in Preferences -> "Editor / Format / XML", "Elements Spacing" section.
In case this is not the cause of the line breaks, it could be useful if you could send us (support@oxygenxml.com) an XML sample that reproduces your problem (together with the associated CSS/schema).
Best regards,
Mihaela
I suspect that the Comment element is a space-preserve element. In this case all the white spaces are presented in its content, in Author mode.
You can check if the element has a space-preserve content by pressing ENTER inside the element content. If the content completion menu contains the ENTER (line break) entry means that the element is a space-preserve one.
The element can be declared as space-preserve in the associated CSS (if the white-space property has pre value) or in the document schema (you can check the Model view to see the Whitespace property value). Also, an element can be declared as preserve space in Preferences -> "Editor / Format / XML", "Elements Spacing" section.
In case this is not the cause of the line breaks, it could be useful if you could send us (support@oxygenxml.com) an XML sample that reproduces your problem (together with the associated CSS/schema).
Best regards,
Mihaela
Mihaela Calotescu
http://www.oxygenxml.com
http://www.oxygenxml.com
-
- Posts: 52
- Joined: Thu Dec 15, 2011 7:56 pm
Re: CSS display block and line break
Hi Mihaela,
I wish you an happy new year (you and all of your team!).
I was off but now I'm back on this project.
This bug has been fixed today ! ... very easily...
By pressing "the format and indent" button (Ctrl+Shift+I) in Text Mode.
I'm sorry not to have tried this earlier !
Thanks a lot for your support.
Vincent.
I wish you an happy new year (you and all of your team!).
I was off but now I'm back on this project.
This bug has been fixed today ! ... very easily...
By pressing "the format and indent" button (Ctrl+Shift+I) in Text Mode.
I'm sorry not to have tried this earlier !
Thanks a lot for your support.
Vincent.
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service