Display si Visibility

Stefanescu Mihai 2 years ago CSS
Acest articol face parte din cursul Toate lectiile CSS. Te poti inscrie la acest curs aici!

In acest tutorial am sa va invat cum sa ascundeti un element fie folosind display: none fie visibility:hidden si diferenta dintre ele.

visibility:hidden va ascunde un elemente, dar spatiul ocupat de acesta va ramane gol ca si cand el inca ar mai fii acolo, iar display: none va ascunde elementul si va elibera spatiul ocupat de acesta, iar pagina va fi afisata ca si cand acel element nu ar fi existat.

Exemplu visibility:

h1.hidden {
    visibility: hidden;

Exemplu display:

h1.hidden {
    display: none;

Display – Elementele inline si block

Un element de tip block este un element ce ocupa toata latimea disponibila si insereaza un line break inainte si dupa el.

Elemente de tip block:

  • <h1>
  • <p>
  • <li>
  • <div>

Un element inline ocupa decat latimea necesara lui si nu introduce nici-un line break.

Elemente de tip inline:

  • <span>
  • <a>

Schimba tipul unui element

Cand faceti un design HTML/CSS va trebuii  sa schimbati tipul unui element block in inline sau invers pentru a face o pagina sa arate intr-un anumit fel.Cum schimbam un element <li> din block in inline:

display: inline;

Cum schimbam un element <span> din inline in block:

display: block;


Programator de ~8 ani, am lucrat la proiecte din mai multe industrstrii, de la eCommerce la telecomunicatii la automatizari. In acest timp am folosi diferite tehnologii, de la PHP, MySQL, PostgreSql, RabbitMq, Redis, Memcached si altele.

Get in touch
Pentru nelamuriri, dubii, comentarii si chestii de pe suflet ne putem auzi pe Discord, Reddit sau poti deschide o discutie noua pe forum

Platelet-rich plasma therapy for hair loss # 5 months ago I am curious to find out what blog platform you have been working with? I'm having some small security problems with my latest blog and I'd like to find something more safe. Do you have any suggestions?
digestive health # 5 months ago Everyone loves what you guys are up too. This kind of clever work and coverage! Keep up the good works guys I've included you guys to my blogroll.
tretinoin sin receta en Bรฉlgica # 1 month ago Hello there! I could have sworn I've visited your blog before but after looking at many of the articles I realized it's new to me. Regardless, I'm certainly pleased I found it and I'll be book-marking it and checking back frequently!
comprar cetirizine 10 mg # 1 month ago Hey there! This is my 1st comment here so I just wanted to give a quick shout out and tell you I genuinely enjoy reading through your articles. Can you recommend any other blogs/websites/forums that deal with the same topics? Thanks for your time!
comprar aygestin en Chile # 1 month ago Pretty section of content. I just stumbled upon your blog and in accession capital to assert that I get actually enjoyed account your blog posts. Anyway I will be subscribing to your feeds and even I achievement you access consistently quickly.
tazzle commander ร  Paris # 1 month ago Great article.
Medikamente ohne Rezept in Belgien kaufen # 1 month ago Amazing! Its really awesome post, I have got much clear idea regarding from this post.
prix du sildenafil 50 mg au Maroc # 1 month ago I got this site from my friend who informed me regarding this web page and now this time I am visiting this website and reading very informative articles at this time.
Kauf von etodolac 300 mg Mylan in Deutschland # 1 month ago Hello! I'm at work surfing around your blog from my new iphone! Just wanted to say I love reading your blog and look forward to all your posts! Keep up the fantastic work!
Belinda # 4 weeks ago Hi there! This is my 1st comment here so I just wanted to give a quick shout out and say I truly enjoy reading through your articles. Can you suggest any other blogs/websites/forums that cover the same topics? Many thanks!
Nannette # 3 weeks ago Quality articles is the key to attract the people to pay a visit the site, that's what this website is providing.
Gilberto # 2 weeks ago It's a shame you don't have a donate button! I'd certainly donate to this superb blog! I guess for now i'll settle for book-marking and adding your RSS feed to my Google account. I look forward to new updates and will share this blog with my Facebook group. Talk soon!
Club-ul este dedicat membrilor si ofera access la mai multe zone ale website-ului.
Login Register

๐Ÿ”– Bookmarks โž•
โœจ Pentru a sustine aceasta comunitate am sa te rog sa te autentifici sau sa te inregistrezi!

๐ŸŒช๏ธ Discord โž•
Back to top
Folosim cookie-uri pentru a oferi functionalitatile critice ale aplicatiei Invata-Programare. Folosim cookie-uri si pentru a analiza traficul, pentru care e nevoie de consimtamantul dvs. explicit.