Avatar billede emmapigen Nybegynder
02. juli 2009 - 13:28 Der er 7 kommentarer og
1 løsning

Centrering af menu

Er der nogle der kan fortælle mig om der ligger en mulighed for at centrerer menuen i dette stylesheet:

/* Normal, standard links. */
a:link {
    color: #212B32;
    text-decoration: none;
}
a:visited {
    color: #212B32;
    text-decoration: none;
}
a:hover {
    color: #212B32;
    text-decoration: underline;
}
/* Navigation links - for the link tree. */

.nav, .nav:link, .nav:visited {
    color: #212B32;
    text-decoration: none;
}
a.nav:hover {
    color: #0000FF;
    text-decoration: underline;
}
/* Navigation links - for the link tree. */
span.pathway
{
    display: block;
    height: 16px;
    line-height: 16px;
    vertical-align: middle;
    margin-top: 5px;
    margin-bottom: 10px;
    color: #212B32;
    font-weight: normal;
   
}
span.pathway img
{
    margin: 0px 10px;
    vertical-align: middle;
}
div#pathway
{
    margin-bottom: 10px;
    padding-left: 8px;
}
/* Tables should show empty cells. */
table {
    empty-cells: show;
}
/* By default (td, body..) use verdana in black. */
body, td, th, tr
{
    color: #000000;
    font-size: 12px;
    font-family: verdana, sans-serif;
    line-height: 135%;
}
/* The main body of the entire forum. */
body
{
    background: #fff;
    margin: 0;
}
/* Input boxes - just a bit smaller than normal so they align well. */
input, textarea, button
{
    color: #111111;
    font-family: verdana, sans-serif;
    background: #CFCFCF;
    border: 1px solid #A8BEE6;
    padding: 2px;
}
input, button
{
    font-size: 90%;
}
textarea
{
    font-size: 100%;
    color: #000000;
    font-family: verdana, sans-serif;
}
/* All input elements that are checkboxes or radio buttons. */
input.check
{
}
/* Selects are a bit smaller, because it makes them look even better 8). */
select
{
    font-size: 90%;
    font-weight: normal;
    color: #000000;
    font-family: verdana, sans-serif;
    background: #f0f0f5;
}
/* Standard horizontal rule.. ([hr], etc.) */
hr, .hrcolor
{
    height: 1px;
    border: 0;
    color: #666666;
    background-color: #666666;
}
/* No image should have a border when linked */

a img {
    border: 0;
}
/* A quote, perhaps from another post. */
.quote
{
    color: #000000;
    background-color: #A8BEE6;
    margin: 1px;
    padding: 1px;
    font-size: x-small;
    font-style: italic;
    line-height: 1.4em;
}

/* A code block - maybe even PHP ;). */
.code
{
    color: #000000;
    background-color: #dddddd;
    font-family: "courier new", "times new roman", monospace;
    font-size: x-small;
    line-height: 1.3em;
    /* Put a nice border around it. */
    border: 1px solid #000000;
    margin: 1px auto 1px auto;
    padding: 1px;
    width: 99%;
    /* Don't wrap its contents, and show scrollbars. */
    white-space: nowrap;
    overflow: auto;
    /* Stop after about 24 lines, and just show a scrollbar. */
    max-height: 24em;
}

/* The "Quote:" and "Code:" header parts... */
.quoteheader, .codeheader
{
    background: #D2DEE5;
    color: #fefefe;
    padding: 5px;
    text-decoration: none;
    font-style: normal;
    font-weight: bold;
    font-size: x-small;
    line-height: 1.2em;
}
.inputs {
    color: #212B32;
    border: 2px solid #fefefe;
    background: #E2EFFB;
    text-indent: 0.2cm;
}
.inputs:hover {
    border: 2px solid  #454545;
}
.submit:hover {
    border: 2px solid white;
}
/* Generally, those [?] icons.  This makes your cursor a help icon. */

.help {
    cursor: help;
}
/* /me uses this a lot. (emote, try typing /me in a post.) */
.meaction {
    color: red;
}
/* The main post box - this makes it as wide as possible. */
.editor {
    width: 96%;
}
/* Highlighted text - such as search results. */
.highlight {
    background-color: yellow;
    font-weight: bold;
    color: black;
}
/* Alternating backgrounds for posts, and several other sections of the forum. */
.windowbg {
    background: #F5F5F5;
    color: #00305d;
    font-family: tahoma;
}
.windowbg2 {
    background: #f5f5f5;
    color: #00305d;
    font-family: tahoma;
}
.windowbg3 {
    background: #fff;
    color: #00305d;
    font-family: tahoma;
}
/* the today container in calendar */
.calendar_today {
    background-color: #f6f6f6;
}
/* These are used primarily for titles, but also for headers (the row that says what everything in the table is.) */
.titlebg, tr.titlebg th, tr.titlebg td, .titlebg2, tr.titlebg2 th, tr.titlebg2 td {
    color: #fff;
    font-style: normal;
    background:  #CFCFCF;
    padding-left: 10px;
    padding-right: 10px;
    line-height: 14px;
}
.titlebg, .titlebg a:link, .titlebg a:visited {
    font-weight: bold;
    color: #fff;
    font-style: normal;
    font-size: 12px;
}
.titlebg a:hover {
    color: #1C1C1C;
}
/* same as titlebg, but used where bold text is not needed */

.titlebg2 a:link, .titlebg2 a:visited {
    color: #fff;
    font-style: normal;
    text-decoration: underline;
}
.titlebg2 a:hover {
    text-decoration: underline;
}
/* This is used for categories, page indexes, and several other areas in the forum.
.catbg and .catbg2 is for boardindex, while .catbg3 is for messageindex and display headers*/
.catbg, tr.catbg td, .catbg3, tr.catbg3 td {
    color: #fff;
    padding-left: 10px;
    padding-right: 10px;
    text-align: center;
    background: #646464;

}
.catbg2, tr.catbg2, .catbg3 td { }
    color: #fff;
    padding-left: 10px;
    padding-right: 10px;
    background: #646464;
}
.catbg, .catbg2 {
    background: #646464;
}
.catbg, .catbg2 {
    font-weight: bold;
    font-size: 12px;
}
.catbg3, tr.catbg3 td, .catbg3 a:link, .catbg3 a:visited {
    font-size: 95%;
    color: #fff;
    text-decoration: none;
}
.catbg a:link, .catbg a:visited, .catbg2 a:link, .catbg2 a:visited {
    color: #fff;
    text-decoration: none;
    background: #646464;
}
.catbg a:hover, .catbg2 a:hover, .catbg3 a:hover {
    text-decoration: underline;
}
/* This is used for tables that have a grid/border background color (such as the topic listing.) */
.bordercolor {
    background: #fff;
    padding: 0px;
}
/* This is used on tables that should just have a border around them. */
.tborder {
    padding: 0px;
    border: solid 1px #CFCFCF;
}
/* Default font sizes: small (8pt), normal (10pt), and large (14pt). */
.smalltext
{
    font-size: x-small;
    font-family: verdana, sans-serif;
}
.middletext
{
    font-size: 90%;
}
.normaltext
{
    font-size: small;
}
.largetext
{
    font-size: large;
}
/* Posts and personal messages displayed throughout the forum. */
.post, .personalmessage
{
    width: 100%;
    overflow: auto;
    line-height: 1.3em;
}
/* All the signatures used in the forum.  If your forum users use Mozilla, Opera, or Safari, you might add max-height here ;). */
.signature
{
    width: 100%;
    overflow: auto;
    padding-bottom: 3px;
    line-height: 1.3em;
}
/* Sometimes there will be an error when you post */
.error {
    color: red;
}
/* definitions for the main tab, active means the tab reflects which page is displayed */



.maintab_first, .maintab_back, .maintab_last, .maintab_active_first, .maintab_active_back, .maintab_active_last, .mirrortab_first, .mirrortab_back, .mirrortab_last, .mirrortab_active_first, .mirrortab_active_back, .mirrortab_active_last {

    color: #070707;

    vertical-align: top;

    text-transform: uppercase;

}



.maintab_back, .maintab_active_back, .mirrortab_back, .mirrortab_active_back {

    color: #090909;

    text-decoration: none;

    font-size: 9px;

    font-family: tahoma, sans-serif;

    padding: 5px 10px 5px 10px;

}



.maintab_first,.mirrortab_first {

    display: none;

}



.maintab_back,.mirrortab_back {}



.maintab_last,.mirrortab_last {

    display: none;

}



.maintab_active_first, .mirrortab_active_first {

    display: none;

}



.maintab_active_back, .mirrortab_active_back {

    background: #DDE3E3;

    border: solid 2px  #454545;

}



.maintab_active_last, .mirrortab_active_last {

    display: none;

}

/* how links behave in main tab. */



.maintab_back a:link, .maintab_back a:visited, .mirrortab_back a:link, .mirrortab_back a:visited {

    color: #252525;

    text-decoration: none;

    font-weight: bold;

}



.maintab_active_back a:link, .maintab_active_back a:visited, .mirrortab_active_back a:link, .mirrortab_active_back a:visited {

    color: #272727;

    text-decoration: none;

    font-weight: bold;

}



.maintab_back a:hover, .maintab_active_back a:hover, .mirrortab_back a:hover, .mirrortab_active_back a:hover {

    text-decoration: underline;

}
#wrapper {
    margin: 0 auto;
}

#header {
    position: relative;
    height: 243px;
    overflow: hidden;
    background: #530000 url(./images/img/Untitled-2_03.gif) 0 0 repeat-x;
}
#head-r {
    height: 243px;
    background: url(./images/img/Untitled-2_04.gif) 100% 0 no-repeat;
}
#head-l {
    background: url(./images/img/Untitled-2_02.gif) 0 0 no-repeat;
}
#logo {
    position: absolute;
    top: 1px;
    left: 400px;
    display: block;
    width: 300px;
    height: 184px;
    cursor: pointer;
    background: url(./images/logo.gif) no-repeat;
}
#userarea {
    width: 750px;
    height: 50px;
    text-align: center;
    font-size: 1.0em;
    color: #454545;
    font-family: Trebuchet MS;
    border-top: solid 2px #CFCFCF;
    border-bottom: solid 2px #CFCFCF;
}

#userarea a:link, #userarea a:visited {
    color: #111111;
}

#userarea a:hover {
    color: #000000;
    text-decoration: underline;
}

#nav li.active_menu a {
    height: 25px;

}
#nav li {

}
#nav li a {
    color: #454545;
    font-family: Thoma, verdana, sans-serif;
    font-size: 11px;
    font-weight: bold;
    text-align: center;

}
#nav a:hover {
    color: #000;
    text-align: center;
}
#nav {
    margin: 0 0 0 15px;
    padding-top: 205px;
    padding-left: 200px;   

}
#nav ul {
    padding: 0;
    margin: 0;
}
#nav li {
    margin: 0;
    padding: 0;
    float: left;
    display: block;
    height: 25px;
    text-align: center;
}
#nav a {
    text-decoration: none;
    cursor: pointer;
    font-weight: bold;
    text-align: center;
    height: 25px;

}
#nav ul li a:hover, #nav #active a {
    background: #CFCFCF;
    color: #111111;
    height: 29px;
    text-align: right;
    border: solid 1px #999999;
}
#nav li a {
    display: block;
    float: left;
    line-height: 25px;
    padding: 0 8px;
}
#mainarea {
    margin-left: 120px;
    margin-right: 120px;
    position: relative;
    overflow: hidden;
    background: none;
}
#mainsag {

    background:  url(./images/img/Untitled-2_08.gif) 100% 0 repeat-y;
}
#mainsol {
    background:  url(./images/img/Untitled-2_06.gif) 0 0 repeat-y;
}
#footer {
    background: url(./images/img/Untitled-2_10.gif) 0 100% repeat-x;
}
#foot-r {
    height: 155px;
    background: url(./images/img/Untitled-2_11.gif) 100% 100% no-repeat;
}
#foot-l {
    background: url(./images/img/Untitled-2_09.gif) 0 100% no-repeat;
}
#footerarea {
    text-align: right;
    padding-right: 110px;
    padding-top: 40px;
}
#footerarea {
    font-family: Tahoma;
    font-size: 10px;
    color: #000;
    text-decoration: none;
}
#footerarea a:link {
    font-family: Tahoma;
    font-size: 10px;
    color: #454545;
    text-decoration: none;
}
#footerarea a:visited {
    font-family: Tahoma;
    font-size: 10px;
    color: #454545;
    text-decoration: none;
}
#footerarea a:hover {
    font-family: Tahoma;
    font-size: 10px;
    color: blue;
    text-decoration: underline;
}
#footerarea a:active {
    font-family: Tahoma;
    font-size: 10px;
    color: orange;
    text-decoration: none;
}
/* The AJAX notifier */
#ajax_in_progress {
    background: #002962;
    color: white;
    text-align: center;
    font-weight: bold;
    font-size: 18pt;
    padding: 3px;
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
}
#headim-r {
    height: 243px;
    background: url(./images/img/serv_rmdan_22.gif) 100% 0 repeat-y;
}
#headim-l {
    background: url(./images/img/serv_rmdan_21.gif) 0 0 repeat-y;
}
.toolbar {
    background: url(./images/serv_rmdan_18.gif) 0 100% repeat-x;
}
.tool-l {
    height: 23px;
    background: url(./images/serv_rmdan_19.gif) 100% 100% no-repeat;
}
.tool-r {
    background: url(./images/serv_rmdan_16.gif) 0 100% no-repeat;
}
#toolbar2 {
    background: url(./images/img/serv_rmdan_18.gif) 0 100% repeat-x;
}
#tool2-l {
    height: 23px;
    background: url(./images/img/serv_rmdan_tr.gif) 100% 100% no-repeat;
}
#tool2-r {
    background: url(./images/img/serv_rmdan_tl.gif) 0 100% no-repeat;
}
.alt {
    background: url(./images/serv_rmdan_100.gif) 0 100% repeat-x;
}
.alt-l {
    height: 47px;
    background: url(./images/serv_rmdan_11.gif) 100% 100% no-repeat;
}
.alt-r {
    background: url(./images/serv_rmdan_08.gif) 0 100% no-repeat;
}
#blok {
    background: url(./images/img/serv_rmdan_fw.gif) 0 100% repeat-x;
}
#blok-l {
    height: 23px;
    background: url(./images/img/serv_rmdan_fr.gif) 100% 100% no-repeat;
}
#blok-r {
    background: url(./images/img/serv_rmdan_fl.gif) 0 100% no-repeat;
}
#alt {
    background: url(./images/serv_rmdan_100.gif) 0 100% repeat-x;
}
#alt-l {
    height: 47px;
    background: url(./images/serv_rmdan_11.gif) 100% 100% no-repeat;
}
#alt-r {
    background: url(./images/serv_rmdan_08.gif) 0 100% no-repeat;
}
#toolbar {
    background: url(./images/serv_rmdan_18.gif) 0 100% repeat-x;
}
#tool-l {
    height: 23px;
    background: url(./images/serv_rmdan_19.gif) 100% 100% no-repeat;
}
#tool-r {
    background: url(./images/serv_rmdan_16.gif) 0 100% no-repeat;
}
Avatar billede repox Seniormester
02. juli 2009 - 13:42 #1
Jeg er ikke helt sikker på hvor diplomatisk jeg kan være i dette tilfælde, men tag det som der og lær af det:

Dit spørgsmål har intet med PHP at gøre. Der er faktisk ikke en eneste linie PHP i dit indlæg. Derfor hører spørgsmålet ikke til i denne kategori.

Det nytter ikke at smide en hel CSS fil ind i indlægget og håbe på at folk kan gætte hvad din CSS reelt set gør.

Relateret til førnævnte, er det ikke muligt at se om din CSS i det hele taget virker som det skal. Det er nødvendigt at se din CSS i aktion - send evt. et link til siden du forsøger at centrere din menu på.

Der er ingen der gider at kigge hele din CSS fil igennem. Du kunne selv have gjort noget for at minimere mængden af CSS som omhandler din menu.
Avatar billede emmapigen Nybegynder
02. juli 2009 - 14:18 #2
Sikke da et venligt og yderst sagligt svar.....tak
Avatar billede mcb2001 Nybegynder
02. juli 2009 - 14:34 #3
#1 - jeg giver dig ret...
#2 - du må sætte dig lidt ind i tingene inden du bare brokker dig - du lave en fejl, så er det også dig der må tage problemet...
Avatar billede majbom Novice
02. juli 2009 - 14:48 #4
-> #2 - du kan jo starte med at koge koden ned til det der omhandler din menu, flytte den til css-kategorien og til sidst lægge et link til siden, så det er muligt at se hvad der sker og ikke sker...

btw så synes jeg nu at #1 sagde det fint, der er vel ingen grund til at pakke det mere ind?
Avatar billede emmapigen Nybegynder
10. juli 2009 - 12:29 #5
skriv et svar og der gives point
Avatar billede repox Seniormester
10. juli 2009 - 12:31 #6
Dit problem blev ikke løst.
Læg selv et svar og luk spørgsmålet.
Avatar billede majbom Novice
04. november 2010 - 12:50 #7
emma?
Avatar billede emmapigen Nybegynder
27. marts 2011 - 16:49 #8
test
Avatar billede Ny bruger Nybegynder

Din løsning...

Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.

Loading billede Opret Preview
Kategori
Vi tilbyder markedets bedste kurser inden for webudvikling

Log ind eller opret profil

Hov!

For at kunne deltage på Computerworld Eksperten skal du være logget ind.

Det er heldigvis nemt at oprette en bruger: Det tager to minutter og du kan vælge at bruge enten e-mail, Facebook eller Google som login.

Du kan også logge ind via nedenstående tjenester