Customizing Table different pages using CSS

  • Author
    Posts
  • #715101

    jhanyoho
    Member

    Hello,

    I’m currently building a site for a professor and I’m having a little trouble with tables. I have the CSS sheet set a certain way for tables (vertical-align:middle; align:center), but what if I want tables on a different page left aligned and vertically aligned at the top? Is there a way to do this on CSS? Is there some ID or coding I could put in so the tables look a certain only on a certain page?

    The site I’m working on is: hungcamthai.com

    Thank you!

    #715251

    If you look at the source code for each page, and look in the opening body tag, you will see a bunch of CSS classes. To target a specific page I recommend using the page id class such as the example below.

    .page-id-2

    So as an example, if you wanted to change something in #content for page ID 34, you would do this:

    .page-id-34 #content {

    #715272

    jhanyoho
    Member

    I tried it, but it still seemed to change the tables on other pages as well….

    I found the page ID by going to “edit page” on dashboard and looking at the number that pops up at the url bar….

    Thoughts?

    #715279

    What CSS selector did you use? And if you can provide a link to the page where the table is, then we could take a closer look.

    #715286

    jhanyoho
    Member

    ah! I figured it out.

    I was looking at two different page urls and put in the wrong id number.

    -__-

    Thank you sacredpath!

    Issue resolved!

The topic ‘Customizing Table different pages using CSS’ is closed to new replies.