...

View Full Version : Urgent help needed css align center...



bnewton91
10-18-2009, 08:14 PM
Hey :thumbsup:

I know you've all ran here thinking its a simple... margin: 0px auto; job... but its not I'm afraid. :confused: :confused: :confused:

Take a look at http://www.lab15.co.uk/newweb

I want the Navigation menu to be central (I'm trying to achieve the look of the www.etnies.com (http://www.etnies.com) heading.)

CSS can be found by using: http://www.lab15.co.uk/newweb/css/main.css

Any and all help is appreciated mucho! I'm very stuck on this one, no matter what I do it won't centralise!!!!!!!!!!!!! :mad:

SlyOne
10-18-2009, 08:36 PM
by the way, you should validate your code...especially as you don't even have a doc type in there aswell :eek:

http://validator.w3.org/check?uri=http://www.lab15.co.uk/newweb/%23&charset=(detect+automatically)&doctype=Inline&group=0

bnewton91
10-18-2009, 08:40 PM
Cheers, I shall do that now.

I hadn't got round to that because this issue is stressing me out... any tips or pointers on how to fix it?

SlyOne
10-18-2009, 08:40 PM
also, not sure if it'd make any difference, but i noticed:


#wrapper {
width: 100%;
height: 106px;
background-image: url(../images/index_08.png);
margin: 0px Auto;
}

#header {
margin: 0px Auto;
width: 700px;
background-image: url(../images/index_08.png);
height:106px;
}

Your margin: 'auto' is spelt Auto and should be auto....


Oh and also try using
text-align: center to sort your navigation

SlyOne
10-18-2009, 08:42 PM
also noticed you haven't used any resets in your CSS, I advise doing so otherwise your gonna have difficulties later on with cross browser consistencies. I import :
@import url('reset.css');

This reset.css into my main css:

html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, font, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td {
margin: 0;
padding: 0;
border: 0;
outline: 0;
font-size: 100%;
vertical-align: baseline;
background: transparent;
}
body {
line-height: 1;
}
ol, ul {
list-style: none;
}
blockquote, q {
quotes: none;
}
blockquote:before, blockquote:after,
q:before, q:after {
content: '';
}

/* remember to define focus styles! */
:focus {
outline: 0;
}

/* tables still need 'cellspacing="0"' in the markup */
table {
border-collapse: collapse;
border-spacing: 0;
}


will hopefully save you some heartache later



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum