Aldro ([personal profile] aldro) wrote in [community profile] style_system2011-05-17 01:18 pm

Line in Entries

I sometimes post a line (code is <hr>) in my entries to seperate topics and I noticed that the line doesn't spread out over the entire lenght of my entry holder, like it should and does in some of my friend's posts. I don't know if that's due to some code in my CSS or if there's another reason for this. However, I would like to change it. Does anybody know how?

P.S. I don't have an example image, but I can make one if necessary. Thanks in advance!
blnchflr: Remus/Ghost!Sirius (html)

[personal profile] blnchflr 2011-05-17 03:26 pm (UTC)(link)
Looks like it stems from this bit in the css stylesheet:

.entry-content hr,
.comment-content hr {
display: block;
margin: 1em 10%;
}


You can input the edited css here: http://www.dreamwidth.org/customize/options?group=customcss - I assume this would work:

.entry-content hr,
.comment-content hr {
margin: 0;
}


I'm not actually sure what display: block does for a horizontal line, but I'm sure someone else does.
adalger: Earthrise as seen from the moon, captured on camera by the crew of Apollo 16 (Default)

[personal profile] adalger 2011-05-17 04:01 pm (UTC)(link)
It doesn't do anything. hr is a block element by definition. A little experimentation leads me to believe you can't inline it, even if you wanted to.
zvi: self-portrait: short, fat, black dyke in bunny slippers (Default)

[personal profile] zvi 2011-05-17 04:28 pm (UTC)(link)
?? Block elements have margins. What are you talking about?
adalger: Earthrise as seen from the moon, captured on camera by the crew of Apollo 16 (Default)

[personal profile] adalger 2011-05-17 06:27 pm (UTC)(link)
Here's a reference. And another. Although I suppose it's open to interpretation, as the standard only lists block as a typical default display property, so "by definition" may have been an erroneous characterization.

At any rate, I was unable to persuade an hr element to allow any content to its left or right by putting { display:inline; } in its styling, but that may be peculiar to IE7. I'll try later when I have access to Chrome.
zvi: self-portrait: short, fat, black dyke in bunny slippers (Default)

[personal profile] zvi 2011-05-17 06:56 pm (UTC)(link)
Yesss, but I think the op's issue was with the margin amounts, not defining a block element as a block element.
adalger: Earthrise as seen from the moon, captured on camera by the crew of Apollo 16 (Default)

[personal profile] adalger 2011-05-17 07:37 pm (UTC)(link)
Oh! I think I see what happened. My brain often just assumes that the context I'm thinking when I write something should be magically obvious to everyone in the universe everywhere, and I responded to just the bit about what display:block does. Without, of course, providing any indication at all that I was talking about just that. So, yes, of course, you're absolutely correct; block elements have margins, and the css [personal profile] blnchflr provided very nicely corrects the op's issue. But because my brain insists on believing my context is the only one that exists, I didn't even make the connection when you EXPLICITLY MENTIONED MARGINS that you were taking my comment as attaching to a different part of the parent comment than the part I intended.
syntheid: [Elementary] Watson drinking tea looking contemplative (Default)

[personal profile] syntheid 2011-05-17 06:33 pm (UTC)(link)
Well you can inline it, it's just kind of. It's no longer a horizontal line. And apparently you can't really do anything with it at that point. But you can also set it to display: inline-block, which makes it horizontal, but inline. So it ... may have been doing something at some point to explicitly declare display: block, but who knows.
marahmarie: (M In M Forever) (Default)

[personal profile] marahmarie 2011-05-28 12:55 am (UTC)(link)
not actually sure what display: block does for a horizontal line

My guess: it separates it presentation-wise from the rest of the style elements. So it doesn't wrap into sentences above and below it, for example. And so you can set margins for it so it won't hang right under the last sentence and right over the next one (because the point of hr is to put lots of space between your last set of thoughts and your next, within one post - to change the subject entirely, in other words).