Forums

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

Home Forums CSS Query in SCSS- Urgent

  • This topic is empty.
Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #167771
    pallavi1811
    Participant

    Hi
    I am using first time SCSS framework.

    Below is my html code:

        &lt;ul id="helpful"&gt;<li><img src="../images/star.png" /><a href="submitRating('1');">Helpful</a></li><li><a href="submitRating('0')">Not Helpful</a></li></ul>   
    

    My SCSS is:

    #helpful {
        width: 383px;
        margin-left: 220px;
        li {
            display: table-cell;
            vertical-align: middle;
            }
    }
    

    Now, the issue is css for #helpful is getting applied.

    but for #helpful li its not getting applied.

    What i am doing wrong here?

    #167773
    Paulie_D
    Member

    Could you make a Codepe.io example but that SCSS is valid.

    It may be that something else is going on, perhaps with the links or images.

    #167807
    pallavi1811
    Participant

    I am creating this <ul id=”helpful”> section from a JS. Does it make any difference then?

    Because its still not working for me. Its a very big code, how should i put here?

    #167810
    Paulie_D
    Member

    If the Js is firing after the page is loaded then the CSS probably won’t apply unless you are also causing the screen to repaint.

    #167813
    pallavi1811
    Participant

    So what should i do in this case?

    i am including like this in <head>

    <script type=”text/javascript” src=”../js/ver_A.js”> </script>
    <link rel=”stylesheet” href=”verA.scss” type=”text/css” media=”all” />

    #167815
    Paulie_D
    Member

    I’m not sure you can link an SCSS file like that.

    You should, AFAIK, be linking a CSS file.

    #167817
    pallavi1811
    Participant

    Ok.. then do i need to use a css file?

    and inside that css file , i need to import my scss?

    is it like this?

    #167818
    Paulie_D
    Member

    You SASS/SCSS installation will/should output the CSS file and then you would link that just like any other.

    <link rel=”stylesheet” href=”verA.css” type=”text/css” media=”all” />
    
    #167819
    pallavi1811
    Participant

    ok..

    now what i did i saved verA.scss and wrote that helpful code in that.

    and in my HTML file i included verA.css.

    But it is not picking it now my css.

    #167820
    Paulie_D
    Member

    Did your SCSS file output the CSS file?

    Have you used the right path to your CSS file?

    Unless we can see this actually in a live environment I think we’re going in circles.

    Do you have a link?

    #167821
    pallavi1811
    Participant

    No i dont have a link. i am doing it on my local machine :(

    How can i know that it is giving output css file or not?

    #167822
    Paulie_D
    Member

    It would be in your project set-up.

    What are program are you using to process the SCSS for you?

    #167831
    Paulie_D
    Member
Viewing 13 posts - 1 through 13 (of 13 total)
  • The forum ‘CSS’ is closed to new topics and replies.