Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> Poprawne wykorzystanie elementów html5
d4ng
post
Post #1





Grupa: Zarejestrowani
Postów: 191
Pomógł: 4
Dołączył: 7.03.2010

Ostrzeżenie: (0%)
-----


Witajcie mam mały problem. Tworze stronkę według poprawnego (tak mi się wydaje) html5 i mam problem z dziedziczeniem...

np. strona bloga wygląda tak:

  1. <header></header>
  2. <nav></nav>
  3. <main role="main">
  4. <article>
  5. <img src="images/zdjecie.png" alt="" />
  6. <h2>Lorem ipsum dolor sit amet</h2>
  7. <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua...</p>
  8. </article>
  9. <article>
  10. <img src="images/zdjecie.png" alt="" />
  11. <h2>Lorem ipsum dolor sit amet</h2>
  12. <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua...</p>
  13. </article>
  14. <article>
  15. <img src="images/zdjecie.png" alt="" />
  16. <h2>Lorem ipsum dolor sit amet</h2>
  17. <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua...</p>
  18. </article>
  19. </main>
  20. <footer></footer>


i teraz robie strone dla pojedynczego wpisu

  1. <header></header>
  2. <nav></nav>
  3. <main role="main">
  4. <article class="post">
  5. <img src="images/zdjecie.png" alt="" />
  6. <h2>Lorem ipsum dolor sit amet</h2>
  7. <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua...</p>
  8. </article>
  9. </main>
  10. <aside></aside>
  11. <footer></footer>


Pomimo tego że do article dodałem klase "post" to i tak wszystko zostało odziedziczone.. czy można jakoś uniemożliwić dziedziczenie czy trzeba nadpisywać reguły?

Ps. Czy element <section> będzie dobry dla widgetów sidebara ( <aside> )?

Ten post edytował d4ng 9.01.2015, 11:54:09
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
1 Użytkowników czyta ten temat (1 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 21.08.2025 - 09:04