Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6371725
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T01:07:19+00:00 2026-05-25T01:07:19+00:00

On most my pages I have a specific div that holds the title for

  • 0

On most my pages I have a specific div that holds the title for that page:

<div id="pagetitle">Some Title</div>

And usually immediately after is a table.
I want to select all tables, but only tables after the #pagetitle div.

I intend to add some css to just those tables. Currently I am having to create a class and add that class to all the tables. But I have tons of pages.

Current code:

$('table.valigntop tr td').css('vertical-align','middle');

I need a little help with creating a cool jquery select statement that selects all tables that exist after the #pagetitle element. Whether it’s the best way for my sites is still to be determined.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T01:07:19+00:00Added an answer on May 25, 2026 at 1:07 am

    Alternatively, you can also use nextAll() Here’s an example http://jsfiddle.net/Q8Af6/

    HTML:

    <table><tr><td>table one</td></tr></table>
    <table><tr><td>table two</td></tr></table>
    <div id='pagetitle'></div>
    <table><tr><td>table three</td></tr></table>
    <table><tr><td>table four</td></tr></table>
    <table><tr><td>table five</td></tr></table>
    

    CSS:

    div, table{
        display:block;
    }
    

    JS:

    $('#pagetitle').nextAll('table').css("background", "yellow");
    

    EDIT JS: Add the td selector http://jsfiddle.net/Q8Af6/1/

    $('#pagetitle').nextAll('table').find('td').css("background", "yellow");
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have created a web page that displays a table. Most of the cells
I have created a web page that displays a table. Most of the cells
I have an ASP.NET application. On some pages it requires a specific querystring to
I know that most CSS codes go under app/assets/stylesheets, but I have some snippets
I have a page that loads a lot of analytics & data on specific
I have jqgrid that I am using on most of my pages and I
I have studied most of the posts concerning web page being viewed in an
Lets say you have a fragment of the page which displays the most recent
I am modeling my web app interaction using the Page Object pattern. Most pages
I have a site that usually has news items at the top of the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.