CSS: Placing divs left/center/right inside header

后端 未结 6 1349
-上瘾入骨i
-上瘾入骨i 2020-12-28 16:31

I\'ve been trying to create a site with the following structure:

But I can\'t seem to get the header correct (e1 left, e2 centered, e3 right). I want the three

6条回答
  •  一个人的身影
    2020-12-28 16:49

    You need to give the divs in your header a width, and float header-e3 left.

    Note: They all have the same CSS properties, so just give them the same class like .headerDivs and then you don't have repeating code

    Edit: here is a working jsfiddle: http://jsfiddle.net/eNDPG/

提交回复
热议问题