:before and width not working?
Having trouble deploying Oxygen XML Web Author? Got a bug to report? Post it all here.
-
- Posts: 280
- Joined: Thu Nov 28, 2013 9:32 am
- Location: Hamburg/Germany
- Contact:
:before and width not working?
Hi,
with css I have this rule:
The idea is to have vertially alligned text fields with the element name in front of it. This works fine with the desktop version. However, in Web Author using Firefox the vertical allignment (i.e. the width property of the :before) does not work.
Any ideas or suggestions?
Thanks and regards,
Patrik
with css I have this rule:
Code: Select all
service > *:before {
width : 22em;
content : " " name() ": ";
}
service > * {
display : block;
content : oxy_textfield(edit, "#text", width, 30em);
visibility : -oxy-collapse-text;
}
Any ideas or suggestions?
Thanks and regards,
Patrik
-
- Posts: 517
- Joined: Thu Sep 04, 2014 4:22 pm
Re: :before and width not working?
Post by cristi_talau »
Hello,
By default, ":before" elements have "display:inline". According to the CSS specification, the "width" property does not apply for "inline" elements [1]. That's why the browser renders it this way. However, in the desktop application, we decided to take it into account.
The solution that works in all cases is to use "display:inline-block".
Best,
Cristian
[1] https://www.w3.org/TR/CSS2/visudet.html#inline-width
By default, ":before" elements have "display:inline". According to the CSS specification, the "width" property does not apply for "inline" elements [1]. That's why the browser renders it this way. However, in the desktop application, we decided to take it into account.
The solution that works in all cases is to use "display:inline-block".
Best,
Cristian
[1] https://www.w3.org/TR/CSS2/visudet.html#inline-width
-
- Posts: 280
- Joined: Thu Nov 28, 2013 9:32 am
- Location: Hamburg/Germany
- Contact:
Re: :before and width not working?
Hi Cristian,
indeed this worked for me.
Thanks a lot.
Patrik
indeed this worked for me.
Thanks a lot.
Patrik
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