3 replies [Last post]
turco
turco's picture
Offline
Regular
Hungary
Last seen: 9 years 31 weeks ago
Hungary
Timezone: GMT+2
Joined: 2008-11-17
Posts: 28
Points: 14

Hey,

I have some knowledge on html&css and already built couple of sites with joomla/wordpress however i never created a site by coding from scratch. I did a fix width site and i cant understand some simple things, like;

1- Cant figure out why container having a gap above?

2- When i inspect the site with google chrome, cant see the header block. I have 2 floated items in header. Should i define a height? if yes, why height is not automatically defined by its children element's height?

3- i have 3 floated "featured" items below slider however in the google inspect still they are not included into main div? why?

And i would appreciate your comments on the code, like;

- i would position this element instead like...
- this doesnt make an effect, use this instead..
- shortening the code or easier way to layout what i did...

tia

burak

website: http://www.bakpinar.com

Tony
Tony's picture
Offline
Moderator
Brisbane
Last seen: 2 weeks 6 days ago
Brisbane
Timezone: GMT+10
Joined: 2003-03-12
Posts: 5344
Points: 2965

Hi turco, Here's some quite

Hi turco,
Here's some quite random thoughts that may fix and help you understand the issues, let me know how it goes.
A good practice to follow is validation

It is quite common to add the following to stylesheets:

html, body{
  margin:0;
  padding:0;
} 

Read up on clearfix specially check out Gary near the bottom of the page.

turco
turco's picture
Offline
Regular
Hungary
Last seen: 9 years 31 weeks ago
Hungary
Timezone: GMT+2
Joined: 2008-11-17
Posts: 28
Points: 14

Hi Tony,i already gave  *

Hi Tony,

i already gave  * {margin: 0; padding: 0;} but anyways, the problem was with the google fonts import code in the <head> section. I changed it with <link> style and voila problem solved Smile

I will check the clearfix and let you know my thought, thanks for the quick response Smile

cheers

burak

turco
turco's picture
Offline
Regular
Hungary
Last seen: 9 years 31 weeks ago
Hungary
Timezone: GMT+2
Joined: 2008-11-17
Posts: 28
Points: 14

Ok issue solved i used

Ok issue solved Smile

i used overflow: auto; to both header and main divs and problem solved. Thx alot, it takes sometime for me to understand. There are alot of values to remember Smile

btw i suggest these sites as well for understanding on layouts

learnlayout.com
display: inline-block