Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
SHARED: Understanding Block Level And Inline Level Elements(differences)
Block vs. inline level

As You All know Nearly all HTML elements are either block or inline elements.
The features of block
elements include:

1. Always begin on a new
2.Height, line-height and
top and bottom margins can be
3. Width defaults to 100%
of their containing
element, unless a
width is specified

Inline elements are direct opposite
1.Begin on the same line Height, line-height and top and bottom
margins can't be changed
2.Width is as long as the text/image and can't be manipulated

To change an element's status
you can use
display:inline or display:block. But why would you want to change
block to inline? Wel u can use dis to your advantage:
1.Have an inline element
start on a new line
2.Have a block element
start on the same line
3.Control the width of an
inline element
4.Manipulate the height
of an inline element
5.Set a background
colour as wide as the
text for block elements,
without having to
specify a width
All these and more!
But i @Spruce want to teach you an important trick in css that most people dont feel as important.. Css Aligning
As you know you can align text with d following css
PHP Code:

But what happens when you want to align an element not text these time? You we find it hard. I know you would not find this trick interesting bcos you have not come across sumting like dat be4. Now straight to d point.
PHP Code:

is supposed to align any element to the center but it never does. That is just because you missed the display property, Now if you have been following me 4rm d start you would have seen that inline elements cant be manipulated. So you just add the following line of code and you are good.
PHP Code:

Thank u. Spruce
@Dynamo @Jonath45 @Dealwap
Spruce owner of webforum
[-] The following 2 users Like Spruce's post:
  • Aphatheology, dealwap
Nice post. @spruce

I will keep this is mind...
Posting From

Possibly Related Threads...
Thread Author Replies Views Last Post
  FUN: Share Your Thoughts: Differences Between Sem And Seo Deelino 4 106 10-11-2018, 08:49 AM
Last Post: Deelino
  SHARED: Understanding And Overcoming Masturbation. ELsMB 13 315 08-08-2018, 05:32 PM
Last Post: ELsMB
  Differences Between A Webdeveloper And A Webdesigner dealwap 2 276 07-10-2017, 10:33 PM
Last Post: dealwap
  Discussion: Country Code Top Level Domain Vs. Top Level Domain ryanmontana 7 576 01-10-2017, 11:35 AM
Last Post: Robertunere
  How To Block Ads On Chrome, Firefox And Other Popular Browser dealwap 0 273 11-16-2016, 08:46 AM
Last Post: dealwap
  What Are The Main Differences Between SQL, mySQL and NoSQL? Nostory 1 230 11-05-2016, 09:37 AM
Last Post: dealwap
  FUN: 6 Differences Between The Ones Who Like You And The One Who Will Keep You Don Kekky 2 233 11-04-2016, 05:50 AM
Last Post: Aphatheology
  Creating And Understanding Smf Themes Iphekitan 7 532 10-05-2016, 01:02 AM
Last Post: Iphekitan
  How To Detect And Block Ads Blocker On Your Wordpress dealwap 0 344 09-22-2016, 09:19 AM
Last Post: dealwap
Last Post: Aniexcels

Users browsing this thread: 2 Guest(s)

About Nigeria's Creative Talents

Nigeria's Creative Talents is an online community where every creative Nigerians can share ideas with themselves.

For any more information, please use our contact form.

              User Links