Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I have created a new content type and added a few extra fields. I created a test node and the display is funky. I tried to edit the page, but it is just using the node content widget. How do we adjust this?
Comment | File | Size | Author |
---|---|---|---|
node_content_display.jpg | 71.43 KB | Anonymous (not verified) |
Comments
Comment #1
japerryHello,
I've attempted replicating your issue, but am not seeing any issues. What is the 'Type of MAP' and 'Human resources update' text related to?
When creating a new CT, with a link field this is what I get (as expected):
https://www.evernote.com/shard/s12/sh/b7a54961-9eb1-40b9-928b-6865fe481d...
Comment #2
rosemeria CreditAttribution: rosemeria commentedHello Jakob and Rob,
The problem is if you want to have the label and field contents inline.
They don't match up because there is a margin-top of .83em from h2 tag, and label and field are different font sizes. Changes in the css can fix issue.
.field-label-inline .field-label, .field-label-inline .field-items {
float: left;
margin:0; //add this line
font-size: 16px; //add this line
line-height: 26px; //add this line
}
Comment #3
Anonymous (not verified) CreditAttribution: Anonymous commentedWow, japerry, your's looks just right. I'll try not using inline and see what happens.
Comment #4
Anonymous (not verified) CreditAttribution: Anonymous commentedrosemeria,
You are absolutely correct. I changed them to above and it displayed much better. I'll try your suggestion, too.
Comment #5
japerrygreat, thanks for the input! Marking as fixed
Comment #6
Zarabadoo CreditAttribution: Zarabadoo commentedI think this requires more looking into as the inline fields should work out of box for those that want to use them.
Comment #7
Anonymous (not verified) CreditAttribution: Anonymous commentedrosemeria,
Which css file needs to be edited for this? Or, should I create a new file?
Comment #8
rosemeria CreditAttribution: rosemeria commentedI agree with Zarabadoo (#6) - the commons origins theme should work for inline fields.
Rob (#7) - until the Origins development team fixes inline fields... just hack the global.styles.css file and place this at the bottom. Warning this is just a temporary hack to the theme for development purposes!
.field-label-inline .field-label, .field-label-inline .field-items {
float: left;
margin:0;
font-size: 16px;
line-height: 26px;
}
Comment #9
Anonymous (not verified) CreditAttribution: Anonymous commentedThank you, rosemeria! That did the trick. I appreciate your help and VERY fast response.
Comment #10
Zarabadoo CreditAttribution: Zarabadoo commentedWith the following commit, there will be better default styling for inline fields. I also have to give some love back to some existing fields due to the changes.
http://drupalcode.org/project/commons_origins.git/commit/2cad264
Comment #11
Zarabadoo CreditAttribution: Zarabadoo commentedUpdate status.