Skip navigation
noviceconnie
Currently Being Moderated

sidebar 2 allignment problem

Jun 19, 2012 11:33 AM

I have been working for days to try to fix this but it's over my beginner's head...any help greatly appreciated.

 

<!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>

 

 

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<title>Home</title>

<style type="text/css">

<!--

body {

          font: 100%/1.4 Verdana, Arial, Helvetica, sans-serif;

          margin: 0;

          padding: 0;

          color: #000;

          background-color: #000099;

}

 

 

/* ~~ Element/tag selectors ~~ */

ul, ol, dl { /* Due to variations between browsers, it's best practices to zero padding and margin on lists. For consistency, you can either specify the amounts you want here, or on the list items (LI, DT, DD) they contain. Remember that what you do here will cascade to the .nav list unless you write a more specific selector. */

          padding: 0;

          margin: 0;

          font-size: 36px;

          font-weight: bold;

}

h1, h2, h3, h4, h5, h6, p {

          margin-top: 0;           /* removing the top margin gets around an issue where margins can escape from their containing div. The remaining bottom margin will hold it away from any elements that follow. */

          padding-right: 15px;

          padding-left: 15px; /* adding the padding to the sides of the elements within the divs, instead of the divs themselves, gets rid of any box model math. A nested div with side padding can also be used as an alternate method. */

          color: #000066;

          font-size: 12pt;

          text-align: left;

}

a img { /* this selector removes the default blue border displayed in some browsers around an image when it is surrounded by a link */

          border: none;

}

 

 

/* ~~ Styling for your site's links must remain in this order - including the group of selectors that create the hover effect. ~~ */

a:link {

          color:#FFFFFF; /* unless you style your links to look extremely unique, it's best to provide underlines for quick visual identification */

          background-color: #000066;

          text-decoration: none;

}

a:visited {

          color: #FFFFFF;

          background-color: #000033;

          text-decoration: none;

}

a:hover, a:active, a:focus { /* this group of selectors will give a keyboard navigator the same hover experience as the person using a mouse. */

          background-color: #000033;

          color: #FFFFFF;

}

 

 

/* ~~ this container surrounds all other divs giving them their percentage-based width ~~ */

.container {

          width: 80%;

          max-width: 1260px;/* a max-width may be desirable to keep this layout from getting too wide on a large monitor. This keeps line length more readable. IE6 does not respect this declaration. */

          min-width: 780px;/* a min-width may be desirable to keep this layout from getting too narrow. This keeps line length more readable in the side columns. IE6 does not respect this declaration. */

          background: #FFF;

          margin: 0 auto; /* the auto value on the sides, coupled with the width, centers the layout. It is not needed if you set the .container's width to 100%. */

          border: medium solid #FFFFFF;

}

 

 

/* ~~ the header is not given a width. It will extend the full width of your layout. It contains an image placeholder that should be replaced with your own linked logo ~~ */

.header {

          background-color: #000099;

}

 

 

/* ~~ These are the columns for the layout. ~~

 

 

1) Padding is only placed on the top and/or bottom of the divs. The elements within these divs have padding on their sides. This saves you from any "box model math". Keep in mind, if you add any side padding or border to the div itself, it will be added to the width you define to create the *total* width. You may also choose to remove the padding on the element in the div and place a second div within it with no width and the padding necessary for your design.

 

 

2) No margin has been given to the columns since they are all floated. If you must add margin, avoid placing it on the side you're floating toward (for example: a right margin on a div set to float right). Many times, padding can be used instead. For divs where this rule must be broken, you should add a "display:inline" declaration to the div's rule to tame a bug where some versions of Internet Explorer double the margin.

 

 

3) Since classes can be used multiple times in a document (and an element can also have multiple classes applied), the columns have been assigned class names instead of IDs. For example, two sidebar divs could be stacked if necessary. These can very easily be changed to IDs if that's your preference, as long as you'll only be using them once per document.

 

 

4) If you prefer your nav on the right instead of the left, simply float these columns the opposite direction (all right instead of all left) and they'll render in reverse order. There's no need to move the divs around in the HTML source.

 

 

*/

.sidebar1 {

          float: left;

          width: 20%;

          padding-bottom: 10px;

          background-color: #000066;

          color: #FFFFFF;

          display: inherit;

          position: relative;

          visibility: visible;

    border-bottom-width: medium;

          border-bottom-style: solid;

          border-bottom-color: #000066;

          height: 90%;

 

}

.content {

          padding: 10px 0;

          width: 60%;

          float: left;

}

.sidebar2 {

          float: right;

          width: 20%;

          color: #FFFFFF;

          background-color: #93A5C4;

          padding-top: 10px;

          padding-bottom: 10px;

          padding-left: 0;

          height: 90%;

}

/* ~~ This grouped selector gives the lists in the .content area space ~~ */

.content ul, .content ol {

          padding: 0 15px 15px 40px; /* this padding mirrors the right padding in the headings and paragraph rule above. Padding was placed on the bottom for space between other elements on the lists and on the left to create the indention. These may be adjusted as you wish. */

}

 

 

/* ~~The footer ~~ */

.footer {

          padding: 10px 0;

          background: #93A5C4;

          position: relative;/* this gives IE6 hasLayout to properly clear */

          clear: both; /* this clear property forces the .container to understand where the columns end and contain them */

}

 

 

/* ~~miscellaneous float/clear classes~~ */

.fltrt {  /* this class can be used to float an element right in your page. The floated element must precede the element it should be next to on the page. */

          float: right;

          margin-left: 8px;

}

.fltlft { /* this class can be used to float an element left in your page. The floated element must precede the element it should be next to on the page. */

          float: left;

          margin-right: 8px;

}

.clearfloat { /* this class can be placed on a <br /> or empty div as the final element following the last floated div (within the #container) if the #footer is removed or taken out of the #container */

          clear:both;

          height:0;

          font-size: 1px;

          line-height: 0px;

}

h1,h2,h3,h4,h5,h6 {

          font-family: "Palatino Linotype", "Book Antiqua", Palatino, serif;

          font-style: italic;

          color: #009;

}

h1 {

          font-size: 24px;

          color: #FFFFFF;

          text-align: center;

          font-style: normal;

}

h3 {

          font-size: 18px;

          text-align: center;

          color: #FFFFFF;

}

.h2 {font-size: 24px;

          font-weight: bold;

          color: #000099;

          text-align: center;

}

h6 {

          font-size: 24pt;

          color: #FFF;

          background-color: #EADCAE;

          text-align: center;

          width: 90%;

          margin-right: -10px;

          margin-left: 10px;

          font-style: normal;

          font-weight: bold;

          position: relative;

          vertical-align: middle;

          float: none;

          overflow: hidden;

}

a:hover {

          text-decoration: underline;

}

a:active {

          text-decoration: none;

}

-->

</style><!--[if lte IE 7]>

<style>

.content { margin-right: -1px; } /* this 1px negative margin can be placed on any of the columns in this layout with the same corrective effect. */

ul.nav a { zoom: 1; }  /* the zoom property gives IE the hasLayout trigger it needs to correct extra whiltespace between the links */

</style>

<![endif]-->

</head>

 

 

<body>

 

 

<div class="container">

 

 

  <div class="header"><!-- end .header --><img src="CSN-simple-style.gif" width="856" height="150" alt="CSN Logo" /></div>

 

  <div class="sidebar1">

    <hr />

    <h1>Home</h1>

<hr />

<h1><a href="Brent's Notebook.htm">Brent's Notebook</a></h1>

<hr />

<h1>Storylines</h1>

<hr />

<h1>Sports Radio</h1>

<hr />

<h1>Press Box</h1>

<hr />

<h1>ACC Connections</h1>

<hr />

<h1>SEC Connections</h1>

<hr />

<h1>About CSN</h1>

  </div>

  <div class="content">

    <h6><img src="In_the_News.gif" width="500" height="50" alt="In the News" /></h6>

<p>June 14, 2012</p>

<p><img src="images/SEC logos/SEC.gif" width="72" height="70" alt="SEC" /> SEC DOMINANCE: The SEC captured its eighth and ninth NCAA team championships for the 2011-12   academic year when the LSU women and Florida men won the outdoor NCAA track and   field titles. </p>

<p id="yui_3_2_0_1_13397805831012682">The other seven reigning SEC national champions are   Alabama football, softball, women's golf and gymnastics; Florida men's indoor   track and women's tennis; and Kentucky men's basketball. The SEC record for   single-season team national championships is 10, set in 1998-99. With three   baseball teams playing in the NCAA super regionals as of yesterday — Arkansas,   Florida and South Carolina — the league has a great chance at matching that   record.</p>

    <p>How's this for supremacy: In the last five   years, the SEC has won national titles in 15 of its 20 sports and 28 NCAA titles   overall. The league is so rugged in some sports, four of this year's national   champions didn't win their league title: Alabama football, gymnastics and   women's golf and Florida men's outdoor track, which finished a distant fourth at   last month's SEC Championships. Remember, Alabama's football team didn't win the   Western Division last season, much less the league title. (espn.com)</p>

    <p><a href="Brent's Notebook.htm">MORE</a></p>

    <p> </p>

    <p>Are you a <span class="h2">COMpassionate Fan?</span> See About CSN for details.<!-- end .content --></p>

  </div>

  <div class="sidebar2">

    <h1>Your Playbook for SEC/ACC Football &amp; More</h1>

<hr />

    <h4> </h4>

    <hr />

<h3><!-- end .sidebar2 -->Let Brent do the research for you.</h3>

    <h3>With a heavy emphasis on southern college football, Brent Beaird has been covering college sports since 1992.  </h3>

  </div>

  <div class="footer">

    <h3>Contact Us: Webmaster@collegesportsnotebook.com. All Rights Reserved, 2012</h3>

  <!-- end .footer --></div>

  <!-- end .container --></div>

</body>

</html>

 
Replies
  • Currently Being Moderated
    Jun 19, 2012 12:25 PM   in reply to noviceconnie

    What's the question?

     

    What are you trying to achieve? What's happening instead? In which browser(s)?

     

    Best if you upload the page to the web and post a link so we can view it in our browsers.

     
    |
    Mark as:
  • Currently Being Moderated
    Jun 19, 2012 1:08 PM   in reply to noviceconnie

    BrowserLab only displays screenshots, not live websites. Hard to troubleshoot.

     

    The best way to review your work as you go is by uploading and viewing the live website online in real browsers. We can then use Firebug and other tools to diagnose and analyze the web code.

     

    That's why forums regulars generally use a live hosting server for browser testing and post links here for site checks.

     
    |
    Mark as:
  • Currently Being Moderated
    Jun 19, 2012 1:19 PM   in reply to noviceconnie

    Create a TEST folder on your server.  Upload your work to that folder and post a URL here for us to see in our browsers.  When your question is answered, delete the TEST folder from your server.

     

    Nancy O.

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points