2012-04-13 68 views
0

嗨,我有以下的HTML佈局 - 它呈現我想要的方式,直到我添加表單標籤...我試過設置內聯樣式=「邊距: 0;」正如一些人所建議的,但無濟於事。表單元素破壞我在Internet Explorer中的CSS佈局

此佈局僅適用於Internet Explorer和是針對Internet Explorer的..它是爲了創建一個固定的頭部和左側菜單欄與獨立滾動的內容區域

任何人都可以請解釋爲什麼它的形式是標籤是打破布局(去除標籤將使Internet Explorer上的正確的行爲)

<!-- asdfasd --> 
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
    <html xmlns="http://www.w3.org/1999/xhtml"> 
    <head> 
    <title>Fixed header and left-sidebar</title> 
    <style type="text/css"> 
     body 
     { 
      margin: 0; 
      padding: 150px 0 0 250px; 
      background-color: Yellow; 
     } 
     div#header 
     { 
      position: absolute; 
      top: 0; 
      left: 0; 
      width: 500%; 
      height: 150px; 
      background-color: Red; 
     } 
     div#left-sidebar 
     { 
      position: absolute; 
      top: 150px; 
      left: 0; 
      width: 250px; 
      height: 100%; 
      background-color: Blue; 
     } 
     @media screen 
     { 
      body > div#header 
      { 
       position: fixed; 
      } 
      body > div#left-sidebar 
      { 
       position: fixed; 
      } 
     } 
     * html body 
     { 
      overflow: hidden; 
     } 
     * html div#content 
     { 
      height: 100%; 
      overflow: auto; 
     } 
    </style> 
</head> 
<body> 
    <form id="form1"> 
    <div id="header"> 
     <p> 
     Content can be placed here…</p> 
    </div> 
    <div id="left-sidebar"> 
     <p> 
     Content can be placed here…</p> 
    </div> 
    <div id="content"> 
     <pre> 
The three members of last year’s Lions draft class that have been arrested on marijuana charges since the end of the 
regular season should clear some space on their calendar. 

Wide receiver Nate Burleson wants to have a discussion with the trio — defensive tackle Nick Fairley, running back 
Mikel Leshoure and offensive tackle Johnny Culbreath — about running afoul of the law this year. Burleson thinks 
the Lions have come too far to let off-field things retard their progress and plans to share those thoughts with 
the players in private conversations. 

「I’m a little bit different, I don’t want to put people on blast in front of the team,」 Burleson said, via Dave 
Birkett of the Detroit Free-Press. 「Sometimes you’re going to need to do that. Or a certain guy, certain situations, 
they need to feel that embarrassment of everybody looking down on them. But some of these guys that we saw on the 
board, these are good young men and I know that they’re passionate about being professional athletes, it’s just that 
they make mistakes.」 

There were red flags about the possibility of those mistakes before the Lions added the players to the organization, 
but they chose to ignore them. They’ve gotten burnt by that this offseason, but if Burleson and other veterans can 
get everyone in line the fallout should have minimal impact on the year to come. 

After the Wonderlic score generated by former LSU cornerback Morris Claiborne was leaked by one or more of the 32 
teams that exclusively had access to it, NFL Commissioner Roger Goodell dispatched a memo reminding the various 
franchises that this shouldn’t occur. 

「As we near our annual college player draft, please be reminded that certain information obtained during preparations 
for the Draft, including personal and family details, results of drug tests, scores on the Wonderlic test, and the 
like, are strictly confidential for club use only and are not to be disseminated publicly under any circumstances,」 
Goodell said. 「Disclosing this confidential information about draft-eligible players to the public can be extremely 
damaging to players, clubs, and the league.」 

And so, exactly one week after Goodell reminded the teams not to talk about the things learned while preparing for 
the draft, three different teams disclosed to a reporter that cornerback Janoris Jenkins admitted during pre-draft 
interviews that he continued to smoke marijuana after leaving Florida and enrolling at North Alabama. 

Making the situation even more intriguing is the fact that the disclosure was made to a reporter employed by the 
league. 

In this regard, Albert Breer of NFL Network was simply doing his job. Like the Wonderlic score, what a guy says 
during pre-draft interviews is regarded by the NFL as confidential. Five years ago, for example, when a report 
surfaced that Calvin Johnson, Amobi Okoye, and the late Gaines Adams had admitted in a pre-draft interview to smoking 
marijuana, Chris Mortensen of ESPN publicly wagged a finger at those who leaked the info. 「If I were NFL 
commissioner,」 Mort wrote at the time, 「I’d be mad about this entire process and the leak, and I’d be as mad as I 
was about Adam ‘Pacman’ Jones and Chris Henry embarrassing the NFL with their off-field escapades.」 

The latest breach of confidentiality likely won’t result in the same outcry because Jenkins is viewed as being far 
less sympathetic than Johnson, Okoye, and Adams five years ago and Claiborne one week ago. But regardless of 
whether the player in question is viewed as a good guy or a bad guy, the NFL is (or at least should be) concerned 
about every breach of pre-draft confidentiality. The fact that nearly 10 percent of the league’s teams gave 
confidential information to a reporter working for the league-owned network less than a week after the Commissioner 
reminded all teams to tighten things up arguably constitutes open defiance of the man who is running the sport. 

Either way, it could be time for a new memo. The first one apparently didn’t take. 

As of now, Donald Jones is the number two receiver for the Bills. 

Five options for the Dolphins with the eighth overall pick. 

Patriots DT Vince Wilfork likes the team Bill Belichick has been building this offseason. 

S DeAngelo Smith will be visiting with the Jets this weekend. 

More on former Ravens coach Brian Billick’s comments about the team’s view of JaMarcus Russell when he came out of 
college. 

The Bengals plan to cut back on DE Michael Johnson’s snaps next season. 

Looking back at recent first round decisions by the Browns. 

Alabama LB Donta Hightower and Oregon RB LaMichael James visited with the Steelers. 

LB Tim Dobbins is returning to the Texans. 

Colts P Pat McAfee answered questions from fans on the team’s website. 

Jaguars tackles Eben Britton and Eugene Monroe have formed a strong bond. 

The Titans have used their proximity to Vanderbilt to bone up on their players. 

Texas A&M RB Cyrus Gray could be a good fit for the Broncos offense. 

Projecting the seventh round pick of the Chiefs. 

Raiders G.M. Reggie McKenzie doesn’t like the idea of appearing on Hard Knocks. 

The Chargers are looking for decisions from RB Jacob Hester and T Mario Henderson. 

The addition of LB Keith Rivers could mean fewer three safety looks from the Giants. 

Said Eagles S Nate Allen, 「We’ve done some things this offseason. I’m excited to get back up there with the 
playbook and getting with the guys and getting ready for the season.」 

The trial of the man accused of murdering Redskins S Sean Taylor has been postponed. 

Oregon State DB Brandon Hardin visited with the Bears this week. 

The Lions could draft a defensive lineman in the first round. 

Reviewing what the Packers did in the 2009 Draft. 

Will the Vikings look to the defensive line in the fourth round again? 

Falcons WR Roddy White apologized for upsetting some of his Twitter followers. 

LB James Anderson thinks there will be more pressure from the Panthers defense this season. 

Mike Triplett of the New Orleans Times-Picayune writes that choosing Joe Vitt as interim head coach makes 
perfect sense for a Saints team that wants to keep Sean Payton front and center. 

Checking in with former Buccaneers running back and current high school football coach Mike Alstott. 

Previewing the Cardinals’ offseason workouts, which probably won’t include DE Calais Campbell. 

The Rams haven’t drafted an interior offensive lineman since 2008, a streak that could end this year. 

Some offensive line options for the 49ers at the end of the first round. 

With 10 linebackers currently on their roster, the Seahawks may be looking elsewhere in the draft. 
     </pre> 
    </div> 
    </form> 
</body> 
</html> 
+2

IE的任何特定版本? – peroija 2012-04-13 17:16:41

+0

你可以解釋一下更多關於添加'form'標籤時不起作用的東西嗎?很難說出有什麼突破。 – TLS 2012-04-13 17:17:33

+0

對不起,我的壞 - IE7和IE9 – blue18hutthutt 2012-04-13 17:41:42

回答

2

你的問題很可能是你不喜歡的東西這樣一個事實:

body > div#header 

一旦您添加form此規則不再匹配任何內容。 div#header不再是body的直接子女。

+0

根據我的要求(可滾動內容與固定的標題和側面菜單)什麼可能是一個明智的策略來緩解這種情況? – blue18hutthutt 2012-04-13 17:43:12

+0

你只需要調整到新的佈局。通常情況下,我只是使用id,但我想也許你在這裏做某種瀏覽器檢測。所以也許'body> form> div#header'。 – 2012-04-13 17:44:51

+0

不幸的是沒有效果 – blue18hutthutt 2012-04-13 17:49:03