(CNN) -- Barack Obama and John McCain play up their willingness to reach across the aisle, and now that there's a bipartisan energy compromise on the table, they have the opportunity to put their words to the test.
John McCain supports expanding opportunities for offshore drilling, but Barack Obama opposes it.
A group of Republican and Democratic senators dubbed the "Gang of 10" has put forth a compromise to break the stalemate on energy legislation.
The senators say their plan will lower gas prices, reduce the dependence on foreign oil and strengthen the U.S. economy.
"This is not a Democratic issue, or a Republican issue, it is an issue that affects all of us. I am committed to working with all of my colleagues in a bipartisan manner to resolve the energy crisis. The time for delay is over. We need to act now," said Sen. Kent Conrad, who is leading the proposal.
The proposal includes concessions for both Democrats and Republicans, but compromising carries risks for the White House hopefuls.
Both candidates have been vocal in their support for and opposition to some key parts of the energy compromise.
The major components of the proposal include:
But backing the compromise carries the risk of angering some supporters of both candidates. Watch the candidates trade jabs over energy »
"I think for Obama ... the problem is drilling and is alienating environmental activists. For McCain, the problem is alienating anti-tax advocates, who are already sort of frustrated with him on some level," said John Mercurio, a political analyst.
"We have to drill here and drill now -- not wait and see whether there's areas to explore, not wait and see whether there's a package that needs to be put together, but drill here and drill now," the presumptive Republican nominee said Monday in Lafayette Hill, Pennsylvania.
Obama has opposed new offshore drilling, but he now says he would consider it if it were part of a larger strategy to lower energy costs.
He supports repealing the tax break for oil companies and he's tried to paint McCain as a candidate who is "in the pocket" of big oil corporations.
Obama advocates a windfall profits tax on big oil corporations that would be used to provide a $1,000 rebate to people struggling with high energy costs.
The Democratic hopeful said he supports some of the proposals in the Gang of 10 compromise, but he said he remains skeptical of the drilling provisions.
"Like all compromises, this one has its drawbacks," Obama said Monday in Lansing, Michigan. "It includes a limited amount of new offshore drilling, and while I still don't believe that's a particularly meaningful short-term or long-term solution, I am willing to consider it if it's necessary to actually pass a comprehensive plan.
"I am not interested in making the perfect the enemy of the good -- particularly since there's so much good in this compromise that would actually reduce our dependence on foreign oil."
The "Gang of 10" includes Conrad, D-North Dakota; Saxby Chambliss, R-Georgia; John Thune, R-South Dakota; Lindsey Graham, R-South Carolina; Blanche Lincoln, D-Arkansas; Mary Landrieu, D-Louisiana; Johnny Isakson, R-Georgia; Bob Corker, R-Tennessee; Mark Pryor, D-Arkansas; and Ben Nelson, D-Nebraska.
The presidential candidates have plenty of time to push their proposals on the campaign trail. Congress adjourned Friday for its annual 5-week recess and won't pick up the legislation until it returns in September.
Meanwhile in the House, Republicans have staged a revolt and are demanding that Speaker of the House Nancy Pelosi call the House into session to vote on its version of the energy bill.
Republicans refused to leave the House floor Friday and began five hours of speeches protesting Democratic energy policies immediately after the House was dismissed. The speeches picked up again Monday morning and Republicans have pledged to keep up the effort.
Democrats have called the Republicans' defiance a political stunt, but Rep. Mike Pence of Indiana, who's leading the energy protest, said "it's not a stunt, it's a feat." Watch what Pence says about the revolt »
Most Americans support an increase in offshore oil drilling, but the public is split over whether drilling would lead to lower gas prices next year, according to a CNN/Opinion Research Corp. poll out last week.
According to the poll, 69 percent favor offshore drilling and 30 percent oppose it. iReport.com: Share your thoughts on offshore drilling
Just over half -- 51 percent -- think the drilling would lower gas prices next year, while 49 percent say it would not.
The survey is based on interviews with 1,041 adult Americans conducted by telephone on July 27-29. It carries a margin of error of plus or minus 4.5 percentage points.
CNN's Kate Bolduan contributed to this report.