Can I use one of these instead of display:inline, and if so, which one should I use?
or margin:0?
These work also.
display:initial;
display:unset;
initial
This keyword applies the initial value as defined in the CSS specifications. Sometimes this initial value makes sense (float: none), sometimes itās there for historical reasons (background-repeat: repeat), and sometimes the spec writers made an essentially random-though-somewhat-defensible choice (color: black).
unset
This keyword applies the inherited value if the property is normally inherited (such as color), or the initial value if the property is normally not inherited (such as display). http://www.quirksmode.org/css/cascading/values.html
Although useless CSS, you can use {display:block;}
I have never used the properties āinitialā and āunsetā. I do not know how well supported they are. If well supported, then {display:initial} would be OK. But WHY use a display property at all?
This might be worth your time reviewing. Itās the Webkit User Agent Stylesheet that Firefox uses. Scroll down and look at the default settings used for each HTML tag. <blockquote> is on line 58, but you can check out all of the other tags too. If any element doesnāt behave as you expect, then you override it in your CSS with something that suits what you are trying to achieve (?) with something more appropriate.
If you are really interested in overriding things at a more fundamental level, then look into adding a āCSS Resetā file, such as the one created by Eric Meyer - http://meyerweb.com/eric/tools/css/reset/
And delete the display property. It is not appropriate and it is not needed. The paragraph text shoud be in a block element.
Perhaps if you told us WHY you want to use those unusual styles it would help us understand the structure that you have in mind. But without that context, I stand firmly behind removing the display property from the <p> element.
Then show us the code.
I read the quirksmode page. And I ask again, why supply a property and value when none is needed at all?
Why do you not answer the questions? Tell us how you believe this code will be useful to you? As I see it, itās wasted bytes.
OK, this is what you need to know to tackle that question.
These properties are the default properties for <blockquote>. That means that if you add no external or inline styles, these properties are part and parcel of <blockquote>. This is why you see space around it.
Just for GEE WIZ, notice that the default vertical margins (top and bottom) are 1em. That is the same value that paragraphs have as their default vertical margins, and lists, etc. Itās a common default for vertical margins.
How do you override them???
You override them by applying a value of zero to each of them in your stylesheet.
They can be written individually or in āshorthandā
Webkit is the browser engine that Firefox is built on top of. The user agent stylesheet for Webkit is what provides the default behaviour for all of the HTML tags you display inside Firefox. Before you go getting the wrong idea, you need to to know that:
You cannot change the User Agent Stylesheet itself, but
You can reset it using something like that Eric Meyer page I lined to, or
You can override it with either the inline styles you are using, or more properly using separate CSS files
Right now, only number 3 is relevant to what we are doing. You do need to be aware though that everything you are doing with the styling is overriding what the browser has built into it as part of its User Agent Stylesheet.