html - Sliding Doors Centering -
I have created it quickly but I am including it in my header, the format of the header is a logo on the right and right On the sliding doors should be a fixed height heading with the navigation button. The header's background should go across the full width of the browser, although the actual title (which, on the right hand man logo and navigation) should have a fixed width of about 900 pixels and centered.
Any ideas about how to achieve this? I have tried the following:
& lt; Div id = "header-outer" & gt; & Lt; Div id = "header-container" & gt; & Lt; An id = "logo" href = "& lt; php echo get_option ('home') ;? & gt; /" & gt; & Lt; / A & gt; & Lt; Div id = "header-nav" & gt; & Lt; Ul & gt; & Lt; Li & gt; & Lt; A href = "#" & gt; Home & lt; / A & gt; & Lt; / Li & gt; & Lt; Li & gt; & Lt; A href = "#" & gt; Projects & lt; / A & gt; & Lt; / Li & gt; & Lt; Li & gt; & Lt; A href = "#" & gt; About & lt; / A & gt; & Lt; / Li & gt; & Lt; Li & gt; & Lt; A href = "#" & gt; Portfolio & lt; / A & gt; & Lt; / Li & gt; & Lt; Li & gt; & Lt; A href = "#" & gt; Blogs & lt; / A & gt; & Lt; / Li & gt; & Lt; Li & gt; & Lt; A href = "#" & gt; Contact & lt; / A & gt; & Lt; / Li & gt; & Lt; / Ul & gt; & Lt; / Div & gt; & Lt; / Div & gt; & Lt; / Div & gt; and the following CSS:
div # header-nav {float: left; Width: 100%; Background: rgb (33,33,33); Font-size: 90%; Line-height: general; Margin top: multiplied 90px; } Div # header-nav ul {margin: 0; Padding: 0; List-style: none; } Div # header-nav ul li {float: left; Margin: 0 2px 0 2px; Padding: 0,04 px; Background: URL ('images / tab_left.png') Any repeat left top; } Div # header-nav a {display: block; Background: URL ('images / tab_right.png') Any repeating top header; Padding: 5px 10px 4px 6px; Text-decoration: none; Color: # 333; } Div # header-outer {background: rgb (333333); Height: 100px; Display area; Clean both; } Div # header-container {text-align: center; Margin: 0 auto; Width: 900px; Padding: 0; }
Just trying to understand your problem.
Do you want to display it like this ...
--------- | --------------------- ----------------------------- | --------- | | | Logo navigation | | | --------- | ---------------------------------------- ---------- | --------- Or this way ...
--- ------ | ------------------------------------------- ------- | --------- | | | Logo navigation | | | --------- | ---------------------------------------- ---------- | --------- If you are the first example then the following should be quite easy with the CSS. ..
#logo {float: left; / * Floats logo is left * / div # header-nav {float: right; / * Had to remove the width of 100% so that NA Float * could accept / background: RGB (333333); Font-size: 90%; Line-height: general; Margin top: multiplied 90px; } Div # header-nav ul {margin: 0; Padding: 0; List-style: none; } Div # header-nav ul li {float: left; Margin: 0 2px 0 2px; Padding: 0,04 px; Background: URL ('http://kieransenior.co.uk/images/tab_left.png') Any repeat left top; } Div # header-nav a {display: block; Background: URL ('http://kieransenior.co.uk/images/tab_right.png') The right to repeat the top; Padding: 5px 10px 4px 6px; Text-decoration: none; Color: # 333; } Div # header-outer {background: rgb (333333); Height: 100px; Display area; Clean both; } Div # header-container {text-align: center; Margin: 0 auto; Width: 900px; Padding: 0; } If you want to display it as another example, then you may have to face the center for both the logo and the navigation because I'm not sure that such a CSS cross in the browser Is possible for But I feel somewhat wrong may feel free to correct me.
Hope it helps.
Comments
Post a Comment