The Arcive of vBulletin Modifications Site. |
|
|
#1
|
|||
|
|||
|
Okay, I have a header on a blank page. Right now, it's aligned to the left, touching the side of my browser.
I want to have an imaginary 900px wide, 100px high box, with the header in it. (not repeating though, as the header image itself is only 300px wide). I want the imaginary box to be centered, and the header to the very left of that imaginary box. Here's some codes I have.. Stylesheet.css: Code:
.header {
position:relative;
background:#ffffff url('images/header.png') no-repeat;
height:100px;
width:900px;
padding:0;
color:#ffffff;
align:center;
}
Code:
<body> <div class="header"> </div> </body> |
|
#2
|
||||
|
||||
|
CSS does not have an "align" property. Try "text-align" instead.
|
|
#3
|
|||
|
|||
|
You can't align layout elements with text-align. You have to give it a width and then use margin: auto;
Code:
.header {
position:relative;
background:#ffffff url('images/header.png') no-repeat;
height:100px;
width:900px;
padding:0;
color:#ffffff;
margin: auto;
}
|
![]() |
|
|
| X vBulletin 3.8.12 by vBS Debug Information | |
|---|---|
|
|
More Information |
|
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|