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.
On the node pages, each link is on its own line... how do I style it so that they're all on the same line?
Comments
Comment #1
sangue CreditAttribution: sangue commentedForgot to add, I'm talking about the block part of service links.
Comment #2
nschloe CreditAttribution: nschloe commentedI have the same issue. In 1.x, all service links used to be of the
class="service-links"
which could then be styled in the CSS to sit next to each other, for example.With the advent of 2.x, the service links are all in separate classes such as
class="service-links-digg"
,class="service-links-delicious"
and so forth. This makes it hardly feasible to write proper CSS. Reintroducing theclass="service-links"
would be a way out I guess.Comment #3
phiscock CreditAttribution: phiscock commentedIf you want all the links to behave the same way you can assign a style based on the parent item. The CSS example below makes all the links appear on the same line (in 6.x-2.0 and 6.x-2.x-dev).
From my perspective it is good that each item has its own class as that adds the extra option of styling each link uniquely.
Hope this helps.
Paul
Comment #4
nschloe CreditAttribution: nschloe commentedThis would require the
li
s to be in the classservice-links
, right? That doesn't appear to be the case though:Comment #5
phiscock CreditAttribution: phiscock commentedNo, it requires one of the parents of the li element (at any remove) to be of the class .service-links. So for example from my site it has generated the following code where the list of links is enclosed within a div element with the .service-links class:
Does this make sense?
Comment #6
nschloe CreditAttribution: nschloe commentedIt actually does make sense!
However, I don't have no
service-links
class anywhere. :/ The parent element of thepostmeta
environment in the above HTML snippet is already the node.Comment #7
phiscock CreditAttribution: phiscock commentedCould you use the .postmeta class instead or do you have other lists within this div (on this or other pages) that it would impact upon?
The other thing is that I note your ul has the class .inline. You could use this to trigger an inline property in all the li beneath it. This would seem to make logical sense.
Hope one of these ideas helps.
Paul
Comment #8
nschloe CreditAttribution: nschloe commentedYep, I suppose I could just go ahead and use
postmeta
. Thanks!Comment #9
hargobindComment #10
brayo4 CreditAttribution: brayo4 commentedthx # 7, did it for me in bartik:
/* servie links fix*/
div.service-links li {
display:inline-block;
Comment #11
mpark CreditAttribution: mpark commentedTry this: