css - one section overlapped by other on html page -


I have created a page with some layouts with CSS :) The problem is that the section area is overlapping the header area Is ... :) How to solve this? The header area should be at the top, and then the section area should be displayed

HTML code:

  & lt; Header style = "width: auto, outline: 1 px solid red, position: relative;" & gt; & Lt; Div style = "width: 150px; outline: 1 px solid green;" & Gt; XXXXX picture xxxxx picture xxxxx image & lt; / Div & gt; & Lt; Div style = "width: 810px; height: 70px; outline: 1 px solid yellow" & gt; & Lt; Div style = 'position: relative; Width: Auto; Height: 100%; Profile: 1px solid red; '& Gt; & Lt; Div style = "position: full; top: 50%; height: 20px; width: 100%; margin-top: -10px; outline: 1 px solid green;" & Gt; & Lt; Div style = "float: left; padding: 0 20;" Class = "blue" & gt; News & lt; / Div & gt; & Lt; Div style = "float: left; padding: 0 20;" Class = "blue" & gt; Tax Tips & lt; / Div & gt; & Lt; Div style = "float: left; padding: 0 20;" Class = "blue" & gt; Lifestyle & lt; / Div & gt; & Lt; Div style = "float: right; padding: 0 20;" & Gt; XXXXXX & lt; / Div & gt; & Lt; Div style = "float: right; padding: 0 20;" & Gt; XXXXXX & lt; / Div & gt; & Lt; / Div & gt; & Lt; / Div & gt; & Lt; / Div & gt; & Lt; / Header & gt; & Lt; Section & gt; & Lt; Div class = 'post' & gt; & Lt; Div class = 'post-title' gt; & Gt; TITLE TITLE TITLE TITLE & lt; / Div & gt; & Lt; Div class = 'technical-title' gt; & Gt; & Lt; Div class = 'added' & gt; Mark Neubouck & lt; / Div & gt; & Lt; Div square = 'added-at' & gt; 10: 10: 00 12/12/2014 & lt; / Div & gt; & Lt; / Div & gt; & Lt; Div class = 'post-body' & gt; & Lt; P & gt; Body body body body body body body body body body body & lt; / P & gt; & Lt; P & gt; Body body body body body body body body body body body & lt; / P & gt; & Lt; P & gt; Body body body body body body body body body body body & lt; / P & gt; & Lt; P & gt; Body body body body body body body body body body body & lt; / P & gt; & Lt; / Div & gt; & Lt; / Div & gt; & Lt; / Section & gt;  

CSS code:

  .blue {color: blue; } .post {width: auto:} .added-by {float: left; Font-size: 10px; } .added-at {float: right; Font-size: 10px; } .post {// status: static; First of all, I will suggest you use instead of using inline styles.  

< / P>

Then it is related to your problem. You are using the absolute position to place the contents in the header section, which takes the elements out of the flow and then any place It does not take its container height = 0 . To create inline, try with float instead of status: full

  1. inline Remove the styles for the full position and then add it.

      header> Div {float: left; } Header: After {Content: ""; Display: Table; Clean both; }  

This


Comments

Popular posts from this blog

HTML/CSS - Automatically set height width from background image? -

php - Mysql Show Process - Sleep Commands and what to do -

c - What is the address of buf (the local variable in the main function)? -