Search code examples
javascripthtmlcssoptimizationstylesheet

Migrating style properties to separated .css file


Dear community members,

I need to put all:

    style="display:none" 

from all rows with:

    <p class="text" style="display:none"> 

to the following stylesheet:

    style.css 

on the http://berdyanskaya56.ru/index.html.

Notable is that If I move

    "display:none"

to

    .text 

in

    style.css 

than the descriptive titles don't change respectively to pictures sliding (i.e., use arrow on both sides of the website screen) on the page.

For final clarification:

I need to remove all

    style="display:none" 

from

    <p class="text" style="display:none"> 

to

    .text 

at

    style.css. 

This will substantially help me to clean up the code on the website. After changes are made the <p> tags in html page will look like:

    <p class="text">

If it requires further clarification, just post your comments below this post.

Thank you very much for your help in advance!

UPD: It will require also changing the function controlling display:none in JS. If you can help me with it, just post it below :-)!


Solution

  •    /* style.css */
       /* set all `p` elements having `class` `"text"` 
          `display` property to `none`
       */
       p.text {
          display:none;
       }