Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS little help

  • This topic is empty.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #34576
    drotar
    Participant

    wondering if you can help me out. this code is working perfectly in preview mode and tested perfectly on the css validator. however, once i test it on the browser the color of the buttons turns to green where it should be a burgundy. any insight would be greatly appreciated.

    code is:

    @charset “UTF-8”;
    body {
    font: 100%/1.4 Verdana, Arial, Helvetica, sans-serif;
    background: #FC0;
    margin: 0;
    padding: 0;
    color: #000;
    }
    /* ~~ Element/tag selectors ~~ */
    ul, ol, dl { /* Due to variations between browsers, it’s best practices to zero padding and margin on lists. For consistency, you can either specify the amounts you want here, or on the list items (LI, DT, DD) they contain. Remember that what you do here will cascade to the .nav list unless you write a more specific selector. */
    padding: 0;
    margin: 0;
    }
    h1, h2, h3, h4, h5, h6, p {
    margin-top: 0; /* removing the top margin gets around an issue where margins can escape from their containing block. The remaining bottom margin will hold it away from any elements that follow. */
    padding-right: 15px;
    padding-left: 15px; /* adding the padding to the sides of the elements within the blocks, instead of the block elements themselves, gets rid of any box model math. A nested block with side padding can also be used as an alternate method. */
    }
    a img { /* this selector removes the default blue border displayed in some browsers around an image when it is surrounded by a link */
    border: none;
    }
    /* ~~ Styling for your site’s links must remain in this order – including the group of selectors that create the hover effect. ~~ */
    a:link {
    color: #42413C;
    text-decoration: none; /* unless you style your links to look extremely unique, it’s best to provide underlines for quick visual identification */
    }
    a:visited {
    color: #6E6C64;
    text-decoration: underline;
    }
    a:hover, a:active, a:focus { /* this group of selectors will give a keyboard navigator the same hover experience as the person using a mouse. */
    text-decoration: none;
    }
    /* ~~ This fixed width container surrounds all other blocks ~~ */
    .container {
    width: 1024px;
    background: #FFFFFF;
    margin: 0 auto; /* the auto value on the sides, coupled with the width, centers the layout */
    }
    /* ~~ The header is not given a width. It will extend the full width of your layout. ~~ */
    header {
    background: #F60;

    }

    /* ~~ START TOP NAVIGATION. ~~ */

    .topNav {

    background-color: #0FF;

    }

    .topNav li{
    float: left;
    width: 256px;
    background: #000;
    background-color: #03F;
    height: 40px;

    }

    .topNav a {

    background-color: #B11F28;

    font-size: 16px;
    letter-spacing: 1px;
    text-align: center;
    color: #FFF;
    padding-top: 9px;
    padding-bottom: 9px;
    padding-right: 77px;
    padding-left: 20px;

    }

    .topNav a:visited {

    color: #C90;

    }

    .topNav a:hover {

    background-color: #000;

    }

    .topNav a:active {

    background-color: #F8981D;

    }

    /* ~~ FINISHED %%%%%%%%%%%%%% TOP NAVIGATION. ~~ */

    /* ~~ START**************HOME INTRO SECTION. ~~ */

    #welcome {

    position: relative;

    }

    .contentWL {

    padding: 10px 0;
    width: 750px;
    float: left;
    }

    .contentWR {
    position: absolute;
    padding: 10px 0;
    width: 250px;
    height: 500px;
    margin-top: 26px;
    margin-left: 772px;
    border: 1px solid #FC0;
    }

    /* ~~ The footer ~~ */
    footer {
    padding: 10px 0;
    background: #CCC49F;
    position: relative;/* this gives IE6 hasLayout to properly clear */
    clear: both; /* this clear property forces the .container to understand where the columns end and contain them */
    }

    /*HTML 5 support – Sets new HTML 5 tags to display:block so browsers know how to render the tags properly. */
    header, section, footer, aside, nav, article, figure {
    display: block;
    }

    #88255
    drotar
    Participant

    it is a safari bug, it works perfectly with all the other browsers. I had to convert the .topNav bar into a div id#

Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘CSS’ is closed to new topics and replies.