Andrew Hardiman
Andrew Hardiman

Reputation: 969

Deciphering Websites Code

As part of my education, I am reading the code to the following website, and trying to figure out how it all fits together.

http://p.w3layouts.com/demos/resume_pages/web/

My question; upon inspection of '.logo h1 a' (the word 'Resume' in the top left corner) I see that it is floated left, with 0 margin and no additional positioning. Why is it then, that the element does not sit 'flush' to the left-hand margin of the page? What is instructing the element to position in the way it has?

Upvotes: 2

Views: 161

Answers (1)

Sohrab Hejazi
Sohrab Hejazi

Reputation: 1511

the '.logo h1 a' is sitting inside of a div tag with a class of 'header_style1'.

'header_style1' is sitting inside of a div tag with class 'wrap'. If you look at the CSS code for '.wrap'. you will see that is set to have a width of 80% and is also centered to the page.

Since '.logo h1 a' is ultimately sitting inside of the '.wrap' tag, it is being loaded to the left of that tag.

Upvotes: 1

Related Questions