最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - How to Set Fixed Width of Frameset and centrally Align? - Stack Overflow

programmeradmin5浏览0评论

Recently i got one issue while using a frameset in my Jsp Page.

The Code is :

<html>

    <frameset rows="8%,*" border="0" >
        <frame src="HeaderUi.jsp" name="header" scrolling="no" style="border-bottom:5px solid #630000;min-height:50px;">
        <frameset cols="215px,540px,250px" border="0" >
        <frame src="webSearchUi" name="search">
        <frameset rows="65%,*" border="0" >
        <frame src="webMainPageUi" name="mainPage" scrolling="yes" style="border:1px dotted #7D7D7D; border-top:0px; border-bottom:0px dashed #5c5c5c">
        <frame src="webEventPanelUi" name="eventPanel" style="border:1px dotted #7D7D7D; border-top:1px solid #7D7D7D; border-bottom:0px dashed #5c5c5c">
    </frameset>

    <frame src="webDataPanelUi" name="dataPanel" style="border-style:solid;border-width:0pt;border-color:66CC33"></frameset>

</html>

In this i want to set a fixed width to frameset and display centrally align, Fixed Width Should be 1000px and Centrally align, When i tried this its working properly in IE by using margin auto as ashown in code above, but showing Problem in Chrome and Firefox. Please help me out from this Problem...

Recently i got one issue while using a frameset in my Jsp Page.

The Code is :

<html>

    <frameset rows="8%,*" border="0" >
        <frame src="HeaderUi.jsp" name="header" scrolling="no" style="border-bottom:5px solid #630000;min-height:50px;">
        <frameset cols="215px,540px,250px" border="0" >
        <frame src="webSearchUi" name="search">
        <frameset rows="65%,*" border="0" >
        <frame src="webMainPageUi" name="mainPage" scrolling="yes" style="border:1px dotted #7D7D7D; border-top:0px; border-bottom:0px dashed #5c5c5c">
        <frame src="webEventPanelUi" name="eventPanel" style="border:1px dotted #7D7D7D; border-top:1px solid #7D7D7D; border-bottom:0px dashed #5c5c5c">
    </frameset>

    <frame src="webDataPanelUi" name="dataPanel" style="border-style:solid;border-width:0pt;border-color:66CC33"></frameset>

</html>

In this i want to set a fixed width to frameset and display centrally align, Fixed Width Should be 1000px and Centrally align, When i tried this its working properly in IE by using margin auto as ashown in code above, but showing Problem in Chrome and Firefox. Please help me out from this Problem...

Share Improve this question edited Sep 13, 2011 at 14:34 BalusC 1.1m376 gold badges3.7k silver badges3.6k bronze badges asked Sep 13, 2011 at 6:39 Mayur MateMayur Mate 331 silver badge4 bronze badges 4
  • Your code contains three frameset's: rows and cols and again rows. About what you talk? And how about frameset closing tags? – Andrew D. Commented Sep 13, 2011 at 6:57
  • hi Andrew, I want to just fixed a width of First frameset and showwn centrally. – Mayur Mate Commented Sep 13, 2011 at 7:09
  • First frameset is frameset rows="8%,*" or other? – Andrew D. Commented Sep 13, 2011 at 7:12
  • Yes First frameset is frameset rows="8%,*" – Mayur Mate Commented Sep 13, 2011 at 8:56
Add a ment  | 

1 Answer 1

Reset to default 4

Try to use next HTML markup:

<frameset cols="*,1000px,*" border="0">
  <frame src="about:blank" />
  <!-- Next frameset is centered horizontally and have width:1000px -->
  <!-- Tested in IE8,Chrome13,Opera11.50,Safari5,FF7 -->
  <frameset rows="8%,*" border="0">
    <frame src="HeaderUi.jsp" name="header" scrolling="no" style="border-bottom:5px solid #630000;" />
    <frameset cols="210px,540px,*" border="0">
      <frame src="webSearchUi" name="search" />
      <frameset rows="65%,*" border="0" >
        <frame src="webMainPageUi" name="mainPage" scrolling="yes" style="border:1px dotted #7D7D7D; border-top:0px; border-bottom:0px dashed #5c5c5c" />
        <frame src="webEventPanelUi" name="eventPanel" style="border:1px dotted #7D7D7D; border-top:1px solid #7D7D7D; border-bottom:0px dashed #5c5c5c" />
      </frameset>
      <frame src="about:blank" />
    </frameset>
  </frameset>
  <frame src="about:blank" />
</frameset>
发布评论

评论列表(0)

  1. 暂无评论