• I have a small CSS problem. I am attempting to make the navigation in the centre rather than being to the left.

    (web page) https://www.r2msolutions.co.uk

    I have tried every thing I can think of with the CSS sheet. But to no success the code is

    .nav {
    margin:0 auto;
    list-style:none;
    font-family:Tahoma, Arial, Helvetica, sans-serif;
    text-align:left;
    }

    .nav li {
    display: inline;
    }

    .nav li a {
    margin-top:182px;
    padding:0 1em 0 1em;
    text-decoration:none;
    text-transform:uppercase;
    float:centre;
    color:#FF0000;
    font-weight:bold;
    font-size:14px;
    }

    If any one can help I have been set here for hours and am going a bit mad

    Thank you in advance

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter manwidatan

    (@manwidatan)

    Still have big trouble with this can any one help me please

    You have to specify a width to “.nav”, and a width not in percentage. For example :

    .nav {
    width:820px; /* <– here */
    margin:0 auto;
    list-style:none;
    font-family:Tahoma, Arial, Helvetica, sans-serif;
    text-align:left;
    }

    But is it a wordpress issue ?… ??

    Thread Starter manwidatan

    (@manwidatan)

    Brilliant , thank you. I was messing with “text align” and getting know where fast. I am loving this it is good to be learning stuff. I have one other question regarding CSS if you dont mind. I am trying to get a float effect on the navigation bar. I have found some code and have been trying to insert it but am not sure where. Well to be truthfull I have tried lots of code in diferent places but I am not getting very far.

    Would I just add

    .nav li a {:hover{
    hover color:#FFFFFF;
    text-decoration:none;
    border-bottom:none;

    under the .nav code or add it to the “.nav li a” part or at the footer of the CSS sheet

    Not very sure. I have been sat here the last few hours messing with the code. learnt a bit more about CSS in the process but not had any luck on solving my problem and am now going round in circles

    you need to take more care with spaces and brackets

    .nav li a:hover {
    color:#FFFFFF;
    text-decoration:none;
    border-bottom:none; }

    you could put it anywhere in the style.css

    Thread Starter manwidatan

    (@manwidatan)

    thanks for that,worked a treat. I will keep an eye on my spacing cheers

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Small CSS problem’ is closed to new replies.