Jump to content

I'm new at all this Css


Recommended Posts

Guest Cashster09
Posted

Can someone explain in simple terms what exactly is

 

INline and Block?

 

thanks

Posted

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. :lol:

Posted

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

thanks...

Yeah i always see

display: inline

 

and was wondering what all that was. Is it really necessary to use this?

Posted (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 by jlhaslip
Guest Cashster09
Posted (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 by Cashster09

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...