Guest Cashster09 Posted June 2, 2009 Report Posted June 2, 2009 Can someone explain in simple terms what exactly is INline and Block? thanks
jlhaslip Posted June 2, 2009 Report Posted June 2, 2009 In-line is a term used for elements that do not include a line-break before and after them. A Span of text inside a paragraph is an in-line element. The paragraph is a block element. It has (normally) a line-break before and after it. Can't get any simpler than that.
LSW Posted June 2, 2009 Report Posted June 2, 2009 Or when used to describe CSS generally it is also used to describe where the CSS is placed. Inline CSS is css styles placed within the code, inline with the code element your styling. If the CSS is a Block of code in the header, it is Block CSS. Then there is External style sheets. I am guessing jlhaslip's answer is what you were looking for, but thought I would mention it.
Guest Cashster09 Posted June 2, 2009 Report Posted June 2, 2009 thanks... Yeah i always see display: inline and was wondering what all that was. Is it really necessary to use this?
jlhaslip Posted June 2, 2009 Report Posted June 2, 2009 (edited) Necessary? Depends what you want the page to look like. > <br />.inline { display: inline; border: 1px solid red; }<br />.block { display: block; border: 1px solid blue; }<br /> </pre> <ul> list item list item list item list item </ul> <br><br><ul> list item list item list item list item </ul> <br><br><ul class="inline"> list item list item list item list item </ul> <br><br><ul class="block"> list item list item list item list item </ul> As you can see by the Borders, Block level are extended the width of their containing block and have a 'new-line' aspect. Edited June 2, 2009 by jlhaslip
Guest Cashster09 Posted June 2, 2009 Report Posted June 2, 2009 (edited) i uploaded that to my server and they all look the same except the first inline code.... ok, let me upload again since you've updated that... Ok i see now... thanks for that... Edited June 2, 2009 by Cashster09
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now