www.webdeveloper.com
Results 1 to 3 of 3

Thread: External CSS script properties wont take affect on HTML script

  1. #1
    Join Date
    Apr 2013
    Posts
    1

    External CSS script properties wont take affect on HTML script

    Hello,

    I have created an external CSS script, defining some properties for 2 ID selectors. I am attempting to link them to
    my HTML script but they properties wont take affect.

    CSS script:

    HTML Code:
    #TopMenuBox {
    width:"500px";
    height:"100px";
    border:"1px solid #000";
    border-radius:"50px/50px/50px/50px";
    position:"absolute";
    top:"7%";
    left:"32%";
    }
    
    #SideMenuBox {
    height: 160px;
    width:65px;
    border-radius:50px/50px/50px/50px;
    position:absolute;
    top:30%;
    left:5%;
    border:1px;
    }
    Here is the HTML link tag I am using to import the external CSS properties:

    HTML Code:
    <link rel="stylesheet" type="text/css" href="MainCss.css"/>
    Here are the HTML tags to which the properties are to take affect:

    HTML Code:
    <div id="TopMenuBox" align="center">Top menu box</div>
    
    <div id="SideMenuBox" align="center"> Side menu box </div>
    Thanks in advance and I can clarify if needed.

  2. #2
    Join Date
    Mar 2011
    Posts
    1,144
    First, make sure that the external stylesheet file resides in the same directory as the page you're working on. Then run the page through the W3C CSS validator at http://jigsaw.w3.org/css-validator/ so you can correct the syntax errors.
    Rick Trethewey
    Rainbo Design

  3. #3
    Join Date
    Mar 2012
    Posts
    1,641
    CSS does not use quotes. I.e.
    width:"500px";

    should be:

    width:500px;

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles