I am trying to learn about HTML 5 and CSS 3 so am building a site to do so but just had a query about webkit/gecko engines as have noticed a pixel jump and not sure how to remedy it in the simplest way.
First issue is, as I have given the a tags padding, it has moved the padded area up over the header.
Another issue is there is about a 2px difference between gecko (checked in Safari/Chrome) and Gecko (checked in Firefox), and not sure the best way to make it flush with the bottom of the header element.
On friday/saturday I spent 1 night partying one night studying…this weekend I had friday be my party night and last night study/write papers/homework all night
Yeah I know, there are some fixes around to deal with IE to make sure they recognise the elements but this is just a way for me to begin to learn and work with HTML 5 and CSS 3… just experimenting.
Would you mind explaining which each part is for and how it fixes the issue? Sorry to be a pain, just really want to learn the reasons behind so I don’t keep making mistakes and so I can apply it to different instances.
Display:block on the anchors allow for vertical padding which you set on the anchors.
However once you set that then the <li>'s will appear on different rows even though you set dispay:inline on them. THus the float:left is needed.
Since you floated the <li>'s the parent has collapsed in height and needs a clearing mechanism placed on it. Overflow:hidden does that :).
Generally, learn to float instead of display:inline and then remember to use a clearing mechanism (if you need somehting hanging out of the container then overflow:Hidden wont be the best choice, google the “clearfix technique” instead :).
I mean the real issue was that since the <li> was an inline element via display:inline it wasn’t able to have the anchor contained within it a different way (aka what I posted) is needed…college is having me do all nighters…no sleep