skip to Main Content

Note: I’m not fresh, but I am leaning towards a begginer.

The simple question is: How would I go about adding individual styles to different pages with only 1 style sheet?

Long version:
I have a general style sheet that sets all my website layouts. This determines my navigation bar, my header with logo, and generally everything.

I have been asked to add these tables to the website:
http://cssdeck.com/labs/flat-pricing-tables-for-twitter-bootstrap

Here’s the theme that is being used on the website:
https://www.sktthemes.net/shop/cutsnstyle/

so I want the general layout of the website to stay the same, but have the table show up on the pricing page that is brought up.

I tried placing the style for the tables into the portion of my pricing page html, but that didn’t do anything. The page loaded with text, but was missing the tables completely.

I read about IDs and classes in order to specify layouts and style of pages. That being said, the style page from the table is this enormous thing with multiple IDs and classes already in it.

Can I put a classes in another class? My thought was “could I resolve this by setting each stylesheet as 2 different classes?”. How would I also do this without breaking the general style for the theme of the website?
Can I put both styles in 1 style sheet? How would I go about setting these tables up?

(Apparently this has been marked as being a duplicate question. I took a look at the other topic, but I’m just very confused. I’m not a web designer and this task was assigned to me regardless. I’m just really trying to wrap my head around this. Any help would be appreciated)

2

Answers


  1. I’m not sure I fully understand the question, but for

    how would I go about adding a style to only one page

    just inspect your page with Chrome DevTools and look at the <body> tag to see if there’s any classes or ids that are unique to that page i.e.

    <body class="post-234 someOtherClass etc">
        <div>Some stuff</div>
    </body>
    

    Then in your css:

    .post-234 .div {
        background: green;
    }
    
    Login or Signup to reply.
  2. Go look for your css file. Mostly, all the styles are put there if not inline style on the php file that you’re using.
    And instead of using free version of wordpress, why not download the wordpress package at wordpress.org and to not complicate things, why not make your own theme from scratch or copy a theme code and modify it. I think it would be much easier than what you’re doing..

    THis is just a suggestion. I hope I can help. 🙂

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search