2013-03-17

Most useful changes in HTML5 joked on Me~

Of course we will find a lot of differences between the new HTML, and the older versions. I'm not going to describe them all, because it's obvious, that a long time ago, specialists did it. But I wanted to focus on one difference, which made me confuse, when I once needed to cut graphic for one website. I'm talking about the differences between <section> and <aside> elements. It started from, that I wanted to divide the footer into three columns. I gave my elements some classes (two of them was <section> elements, and the middle one was <aside>) and I typed relevant data in HTML and CSS files... 
..What a big was my surprise, when, after opening the site in a browser, I discovered, that two columns had completely opposite positions. It looked as the 'float:' values in my elements worked completely different. So I began to make various changes in CSS file, but without any result. I even wanted to give my tags, 'position: absolute;', but it would only give the code messy look.. 
..Suddenly I became aware of a very important information, which you can not forget, when it comes to HTML5: Now, in HTML5 tag called <section> stands before element <aside>, so by default, it is set to 'float: left;' (so <aside> is set to 'float:right;'), so even when I gave my <aside> 'float: left', it was still operate in a way, that was setting the center column, after the last column, which was defined by <section>.. 
..I wasted too much time, trying to find error, while enough to replace <section> with <aside>, at the beginning of my work, because in HTML5, you don't need to worry anymore about floats. So what's my advice for today?: Never forget about that! -,-

Brak komentarzy:

Prześlij komentarz

Dziękuję Ci za poświęcony czas i pozostawienie komentarza :)