HTML & CSS Layout Flow Issue

前端 未结 2 1274
孤独总比滥情好
孤独总比滥情好 2021-01-21 20:17

I have a flow layout with following two alignment issues

  1. Refer Image 1: When I change the zoo, the title info overlaps the logo.

  2. Refer Image 2:

相关标签:
2条回答
  • 2021-01-21 20:43

    body {
      margin: 0px;
      padding: 0px;
      text-align: center;
      background: Yellow;
    }
    #wrapper {
      width: 100%;
      height: auto;
      text-align: left;
      margin: 0 auto;
      /*background: #FFBA31;*/
      background: #FFBA31;
    }
    #container {
      width: 100%;
      height: auto;
      margin: 0 auto;
      background: white;
    }
    #header {
      background: none repeat scroll 0 0 white;
      border: 1px solid Red;
      height: 70px;
      margin-bottom: 20px;
      padding: 0 0 10px;
      width: 100%;
    }
    #titleInfo {
      border-bottom: 3px solid #FCDA55;
      color: #2377D1;
      float: right;
      font: bold 18pt Arial;
      height: 35px;
      margin: 10px 0 0 10px;
      overflow: hidden;
      padding: 10px 0 0;
      width: 55%;
    }
    #signOut {
      font: bold 9pt Arial;
      float: right;
      border-bottom: none;
      padding: 0px 10px 0 0;
      margin: 0px 0px 30px 0;
      display: inline;
    }
    #logo {
      border: 1px solid orange;
      float: left;
      height: 32px;
      margin: 03px 0 0 20px;
      padding: 10px 0 30px;
      width: 15%;
    }
    #centralContainer {
      width: 100%;
      height: auto;
      margin: 0 auto;
      background: white;
    }
    /*Elements within centralContainer*/
    
    #leftNavContainer {
      background: none repeat scroll 0 0 #CCCCCC;
      border: 1px solid Blue;
      float: left;
      height: 700px;
      margin: 0 0 0 10px;
      width: 20%;
    }
    #subContainerForLeftNav {
      width: 190px;
      height: auto;
      /*border:1px solid green;*/
    }
    #mainContainer {
      background: none repeat scroll 0 0 white;
      border: 1px solid Green;
      height: 700px;
      margin: 0 0 0 219px;
      width: 76%;
    }
    .menuText {
      font: bold 13pt Arial;
      line-height: 15pt;
      color: #00A6B5;
    }
    .menuTextHeading {
      height: 20px;
      border-bottom: 3px solid #fcda55;
      padding: 10px 0 10px 0;
      margin: 0 0 10px 0;
    }
    .buttonAlign {
      height: auto;
      width: auto;
      float: right;
      padding: 0 0 0 0;
      margin: 0 0 0 0;
    }
    .backgroundButton {
      width: 150px;
      height: 86px;
      display: block;
      margin: 0px 0px 5px 0px;
      background-image: url('../Images/ButtonBackground.bmp');
    }
    .buttonText {
      font: bold 15pt Arial;
      line-height: 18pt;
      color: #ffffff;
      padding: 40px 15px 0 15px;
      margin: 0 0 0 0;
      text-align: center;
    }
    .clear {
      clear: both;
    }
    <!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 id="Head1">
      <title>Support Site</title>
      <link href="Styles/MasterStyle.css" rel="stylesheet" type="text/css" />
    </head>
    
    <body>
      <div id="wrapper">
        <div id="container">
          <div id="header">
            <div id="logo">
              <img alt="logo" src="Images/Logo.bmp" />
            </div>
            <div id="titleInfo">
              <a href="#">Admin XXXXXXXX Support Site</a>
              <div id="signOut">
                <a id="logOnStatus" class="signOut">
                                Logout</a>
              </div>
            </div>
            <div class="clear">
            </div>
          </div>
          <div id="centralContainer">
            <div id="leftNavContainer">
              <div id="subContainerForLeftNav">
                <div id="adminDiv">
                  <div class="backgroundButton" id="adminButton">
                    <p class="buttonText">
                      The Admin</p>
                  </div>
                </div>
                <div class="clear">
                </div>
                <div id="vendorDiv">
                  <div class="menuTextHeading">
                    <a class="menuText">The Management</a>
                  </div>
                  <div class="buttonAlign">
                    <div class="backgroundButton" id="connectivityButton">
                      <p class="buttonText">
                        Test</p>
                    </div>
                    <div class="backgroundButton" id="vendorsButton">
                      <p class="buttonText">
                        Test</p>
                    </div>
                  </div>
                </div>
                <div class="clear">
                </div>
                <div id="monitoringDiv">
                  <div class="menuTextHeading">
                    <a class="menuText">Test</a>
                  </div>
                  <div class="buttonAlign">
                    <div class="backgroundButton" id="transactionsButton">
                      <p class="buttonText">
                        Test</p>
                    </div>
                    <div class="backgroundButton" id="logsButton">
                      <p class="buttonText">
                        Test</p>
                    </div>
                  </div>
                </div>
              </div>
            </div>
            <div id="mainContainer">
              <div id="transactionContentHolder" class="transactionContentHolder">
                A
              </div>
            </div>
            <div class="clear">
            </div>
          </div>
        </div>
      </div>
    </body>
    
    </html>

    this might help you fiddle

    0 讨论(0)
  • 2021-01-21 20:47

    see fiddle for code and demo

    fiddle: http://jsfiddle.net/L3And/3/

    demo: http://jsfiddle.net/L3And/3/embedded/result/

    Screen Shot:

    enter image description here

    0 讨论(0)
提交回复
热议问题