You are viewing our Forum Archives. To view or take place in current topics click here.
Help with CSS for my website
Posted:

Help with CSS for my websitePosted:

PoisonOak
  • Resident Elite
Status: Offline
Joined: Mar 29, 201212Year Member
Posts: 248
Reputation Power: 11
Status: Offline
Joined: Mar 29, 201212Year Member
Posts: 248
Reputation Power: 11
Hey guys, i'm re-designing my website and i'm having a problem, the navigation menu and header used to be at the top of the page and the position wasn't fixed, and now i moved it to the left side and fixed it so that it would move with the scroll bar. But now when i re size chrome the page content hides behind the navigation area (Pictures below). Does anyone know how to stop the content from moving once it hits the navigation container?

[ Register or Signin to view external links. ]

[ Register or Signin to view external links. ]

Here's my html and css for one of the pages:

   html, body       { margin: 0; padding: 0; }
      body          { color: #333; font: 12px segoe, Georgia, serif; line-height: 18px; background: #000000 url(bodybg.jpg); }
      a            { color: #f37342; text-decoration:none;}
      #container      { height:1px; width: 1000px; margin: 0 auto;}
      #wrapper      { float: left; width: 100%;  }
      
      /* Link Decoration */
      a:link{
      color:#f37342;
      text-decoration:none;
      }

      a:visited{
      color:#f37342;
      text-decoration:none;
      }

      a:hover{
      color:#f04e16;
      text-decoration:none;
      }

      a:active{
      color:#f37342;
      text-decoration:none;
      }
      
      @font-face {
  font-family: poison_font;
 
  /* for IE */
  src: url(fonts/poison_font.eot);   
 
  /* non-IE */
  src: local("poison_font"), url(fonts/poison_font.ttf) format("truetype"); 
}
      
      /* Header */
      #hcontainer { margin: 0 auto; width: 165px; height:100%; border-right:5px solid #f37342;}
      #header         { background: #000000;  border-bottom: 1px solid #f37342; height:100%; position:fixed; }
      #header h1     { color: #f37342; margin: 0 0 8px; padding: 34px 0px 0; font-family: poison_font; text-shadow: 0 2px 0 rgba(0,0,0,.1); font-size:50px; margin-left:10px; }
      #header h2     { color: #f37342; margin: 0 0 8px; padding: 34px 0px 0; font-family: "Patua One", sans-serif; text-shadow: 0 2px 0 rgba(0,0,0,.1); }
      #header p      { color: #ffffff; font-size: 14px; font-weight: bold; margin-left:15px;  }
      /* Content Style */
      #navigation      { background: transparent ; font-weight: bold; font-size:14px; }
      #navigation ul   { padding: 0 0px 0px; margin-top:0; padding-top:13px; }
      #navigation ul li {  list-style-type: none; padding-top: 12px; padding-bottom:12px; padding-left:5px; padding-right:5px; color:#f37342; margin-left:10px; }
      #navigation ul li:hover { background: f37342; color: #FFFFFF; }
      #navigation ul li:active { background: transparent; color: #0e7ebd; }
   
      #extra ul   { padding: 0 0px 0px; margin-top:10px; margin-bottom:10px; }
      #extra ul li { list-style-type: none; padding-top: 12px; padding-bottom:12px; padding-left:10px; border-bottom: 1px solid #EEE; margin-top:5px; }
      #extra ul li:hover { background:#f37342; color: #000000; }
      #extra ul li:active { background: transparent; color: #f37342; }
      #breakline      { border-bottom: 1px solid #ccc; margin: 14px 0 14px 0; }
      #extra small   { font-size: 11px; line-height: 18px; }
      #extra p   { font-size: 11px; line-height: 18px; margin:0 0 0px; }
      #content      { }
      #loginform p      { margin:2 2 2px; }
      #backtransparent   { height:100%; width:100%; background: #96938E; opacity:0.5; border-radius: 5px; margin-top: 20px; margin-bottom: 20px;}
      #navigation ul li.on   { list-style-type: none; padding-top: 12px; padding-bottom:12px; padding-left:10px; padding-right:10px; color:#ffffff; background:#f37342; }
      #navigation ul li.off   { list-style-type: none; padding-top: 12px; padding-bottom:12px; padding-left:10px; padding-right:10px; color:#ffffff; }
      #navigation ul li.on:hover { background: f37342; color: #ffffff; }
      #navigation ul li.on:active { background: transparent; color: #ffffff; }
      #navigation ul li.off:hover { background: f37342; color: #ffffff; }
      #navigation ul li.off:active { background: transparent; color: #ffffff; }
   
      /* Content Positioning and Size */
      #navigation      {  text-transform: uppercase ; }
      #content      { margin: 0 320px 0px 0px; border-radius: 5px; background: transparent ; margin-top:200px; }
      #extra         { float: left; margin-left: -305px; margin-top: 200px; width: 305px; border-radius: 5px; background: transparent ; margin-bottom: 15px; }   
      #extrasec         { float: left; margin-left: 0px; margin-top: 15px; width: 1100px; height:170px; border-radius: 5px; background: transparent ; margin-bottom: 15px; }   
      #footer         { background: transparent url(headimage.jpg); clear: left; width: 100%; border-top: 1px solid #f37342; }
      #footer   p      { margin: 0; padding: 0 18px 10px; color:#f37342; }
      #footer ul      { border-bottom: 1px solid #555; list-style: none; margin: 0 18px 6px; padding: 10px 0 6px; }
      #footer li      { display: inline; font-size: 11px; font-weight: bold; padding-right: 5px; color:#f37342; }
      #paypaldonate   { margin-top:-80px; margin-left:860px; }
      
      /* Text Decoration */
      #content p  { padding-right: 15px; padding-left:20px; padding-bottom:2px; color:#5B5B5B; }
      #content h3  { padding-right: 10px; padding-left:15px; color:#f37342; }
      #content h2  { padding-right: 6px; padding-left:10px; padding-top:10px; color:#2F2F2F; font-size:2em; font-weight: 500; border-left: 5 px solid #f37342; }
      #extra p { padding-right: 15px; padding-left:20px; padding-bottom:2px; color:#5B5B5B; }
      #extra h3  { padding-right: 10px; padding-left:15px; color:#f37342; }
      #extra h2  { padding-right: 6px; padding-left:10px; padding-top:10px; color:#2F2F2F; margin-top:10px; font-size:2em; font-weight: 500; border-left: 5 px solid #f37342; }
      #extrasec p { padding-right: 15px; padding-left:20px; padding-bottom:2px; color:#5B5B5B; }
      #extrasec h3  { padding-right: 10px; padding-left:15px; color:#f37342; }
      #extrasec h2  { padding-right: 6px; padding-left:10px; padding-top:10px; color:#2F2F2F; margin-top:10px; font-size:2em; font-weight: 500; border-left: 5 px solid #f37342; }
      
      #backtotop{
padding:10px;
text-align:center;
color:#f37342;
font-weight: bold ;
font-size: 11px;
}

#backtotop a{
color:#f37342;
}


<html>
<head>
   <link href='http://fonts.googleapis.com/css?family=Patua+One' rel='stylesheet' type='text/css'>
   <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
   <title>Home</title>
   <link type="text/css" media="screen" rel="stylesheet" href="style.css">
   
   <!--[if IE]>
   <style type="text/css">
       #navigation, #content, #extra { margin-top: 20px; }
   </style>
   <![endif]-->
</head><body>
<div id="top"></div>
      <div id="header">
      
      <div id="hcontainer">
         <a href="/index.html">
         <img src="poison_programming_logo.png" alt="Poison Programming Logo" title="Home" style="margin-top:5px;" />
         </a>
      <div id="navigation">
            <ul>
            <a href="/index.html"><li class="on" title="Home">Home</li></a>
            <br />
            <a href="/blogs.html"><li class="off" title="Blogs">Blogs</li></a>
            <br />
            <a href="/programming.html"><li class="off" title="Programming">Programming</li></a>
            <br />
            <a href="/other_sites.html" title="Home"><li class="off" title="Other Sites">Other Sites</li></a>
            <br />
            <a href="/contact_me.html"><li class="off" title="Contact me">Contact Me</li></a>
            <br />
            <a href="/about.html"><li class="off" title="About">About</li></a>
         </ul>
      </div>
            <div id="Header_Bottom" style="position:fixed; bottom:0px;">
            <p style="font-size:8px; padding-right:5px;">Created and coded by Poison,<br />owner of Poison Programming<br />and the Poison Community<br />| <a href="/terms_and_conditions.html">Terms & Conditions</a><br />| <a href="/code_of_conduct.html">Code of Conduct</a></p>
            <div id="backtotop"><a href="#top">Back To Top</a></div>
            </div>
      </div>
      
      </div>
      <div id="container">
      <div id="wrapper">
      <div id="extrasec">
      <h2>Want to help out?</h2>
      <h3>Donate via PayPal</h3>
      <p>
      Donate to Poison Programming to help us get more members, a domain name, and more. Make sure to gift the money, <br />
      and the ammount donated is up to you. This is very appreciated and always accepted. Donators will be added to <br />
      the new "Trusted Donators" page once Poison Programming gets it's first donation. Donate to "[email protected]", <br />
      or you can just click on the PayPal donate page to the right. <br />
      <div id="paypaldonate">

</div>
      </p>
      <div id="breakline"></div>
      </div>
      
         <div id="content">
            <h2>Welcome to Poison Programming</h2>
            <br />
            <h3>About Poison Programming</h3>
            <p>Poison programming is a team based programming studio solution. Where programmers from all around the world can connect with eachother and show off their potential and show other programmers their projects and programs It's completely free to everyone unless you want premium features, a start with 50 programmer points, and more. Poison programming is made up of teams, from VB to web development. The basic concept of Poison Programming is to be able to login and view currently designed and created projects made by other programmers in your programming group. What is a programming group you may ask, well, it's as simple as the title of your programming language. These include: VB Team, C# Team, C++ Team, Web Development Team, and Design Team. I will try to make as many teams as possible that includes most of the programming languages of the world.</p>
            <br />
            <h3>Benefits and Features</h3>
            <p>There are many features included when you sign up for a Poison account. Also many opportunities for benefits. For features, the ability to upload and show your programming work to other users, being able to get credits towards software and programs in the market, entering in competitions to win Poison Points (Based off of team type), and much more. For benefits, there are many spaces on the site for advertising, we will accept program/code advertising to get users directed toward your work in the market, which will rack up the $$$. If we can get the site popular enough, a "Find A Programmer" section will be added. What is this you may ask, well, other users on the sight will make a request for a programmer, that must do a certain task, in a certain ammount of time (optional). The user and the programmer may negotiate out the price, or a dead line price can be chosen and can not be negotiated. How will the money/poison points be handled? Simple, with the points, the site will transfer the points from the user to the programmer, and if it is a money situation, you may choose either to do it through PayPal, through bank accounts, or the site's money transfer program.</p>
            <br />
            <h3>How do i sign up?</h3>
            <p>Join Poison programming today by going to the account tab and creating an account, or by clicking <a href="/account.html">here</a>. You must read and agree to the <a href="/terms_and_conditions.html">terms & conditions</a> along with the <a href="/code_of_conduct.html">code of conduct</a>.</p>
            <br />
            <h3>Is This Only Available On The Website?</h3>
            <p>Not at all, we also provide a windows form application that is very similar to the website. Where you can view and edit your Poison account, view recent topics and updates in the forums, read the newest blogs, view messages, and much more. To download, please either click on the "Programs" tab and find "Poison Programming Studio Solution", or click <a href="/programs.html">here</a>. For Mac OS X users, a version will be released as soon as a java programmer who is familiar with eclipse is able to make a version for mac. Sorry for the inconvenience.</p>
            <div id="breakline"></div>
            </div>
      </div>
      <div id="extra">
         <h2>News & Updates</h2>
         <p>Welcome to the first version of the Poison Programming website! Expect an update by 7/15/12 (UTC-05:00) Eastern Time (US & Canada), site predicted to be down from 3:00 PM to 5:00 PM to work on maintenance. Thank you for your patience.<p>
         <small>Find out more information <a href="#">here</a>.</small></p>
         <div id="breakline"></div>
         <p>Join Poison Programming today to earn FREE Poison Points, which can be used to get software, HD webpage layouts, custom made programs, and more!<p>
         <small>Find out more information <a href="#">here</a>.</small></p>
      <div id="breakline"></div>
<div id="breakline"></div>
      <p>
      Like Poison Programming? Then you'll love FouxNation! Check us out on facebook!
      </p>
      <div class="fb-like-box" data-href="http://www.facebook.com/fouxcommunity" data-width="290" data-show-faces="true" data-border-color="white" data-stream="true" data-header="true"></div>
      <br />
      <p>If the facebook like box does not appear, click <a href="http://www.facebook.com/fouxcommunity" target="_blank">here</a>.</p>
      <div id="breakline"></div>
      </div>
      
      
   </div>
</body>
</html>
   


(Had to remove some scripts and objects from the html, guess TTG doesn't allow them to be posted.)
#2. Posted:
Tums
  • TTG Senior
Status: Offline
Joined: Nov 25, 201013Year Member
Posts: 1,656
Reputation Power: 69
Status: Offline
Joined: Nov 25, 201013Year Member
Posts: 1,656
Reputation Power: 69
z-index might solve it, not particularly sure though. probably not
#3. Posted:
-CJHaCKerZz-
  • Resident Elite
Status: Offline
Joined: Nov 05, 201112Year Member
Posts: 232
Reputation Power: 11
Status: Offline
Joined: Nov 05, 201112Year Member
Posts: 232
Reputation Power: 11
You must create a holding div,
then inside make two classes. Each one will contain either the sidebar or the content.

So something like this will probably do the trick:

Basic HTML:

<div id="holder">
    <div class="sidebar">
        <!-- Sidebar content in here-->
    </div>
    <div class="content">
        <!-- Content in here-->
    </div>
</div>


CSS:

* {
    margin: 0;
    padding: 0;
}

div#holder {
    width: 100%;
    margin: 0 auto;
}

.sidebar {
    width: 23%;
    float: left;
}

.content {
    width: 77%;
    float: right;
}


Hope I helped.
#4. Posted:
PoisonOak
  • Resident Elite
Status: Offline
Joined: Mar 29, 201212Year Member
Posts: 248
Reputation Power: 11
Status: Offline
Joined: Mar 29, 201212Year Member
Posts: 248
Reputation Power: 11
-CJHaCKerZz- wrote You must create a holding div,
then inside make two classes. Each one will contain either the sidebar or the content.

So something like this will probably do the trick:

Basic HTML:

<div id="holder">
    <div class="sidebar">
        <!-- Sidebar content in here-->
    </div>
    <div class="content">
        <!-- Content in here-->
    </div>
</div>


CSS:

* {
    margin: 0;
    padding: 0;
}

div#holder {
    width: 100%;
    margin: 0 auto;
}

.sidebar {
    width: 23%;
    float: left;
}

.content {
    width: 77%;
    float: right;
}


Hope I helped.


This sort of helped, it only took longer for the content to get behind the navigation (below)

[ Register or Signin to view external links. ]

Do you think if i put padding on the left of the content it would stop once it hits the padding?
#5. Posted:
-CJHaCKerZz-
  • Resident Elite
Status: Offline
Joined: Nov 05, 201112Year Member
Posts: 232
Reputation Power: 11
Status: Offline
Joined: Nov 05, 201112Year Member
Posts: 232
Reputation Power: 11
PoisonOak wrote
-CJHaCKerZz- wrote You must create a holding div,
then inside make two classes. Each one will contain either the sidebar or the content.

So something like this will probably do the trick:

Basic HTML:

<div id="holder">
    <div class="sidebar">
        <!-- Sidebar content in here-->
    </div>
    <div class="content">
        <!-- Content in here-->
    </div>
</div>


CSS:

* {
    margin: 0;
    padding: 0;
}

div#holder {
    width: 100%;
    margin: 0 auto;
}

.sidebar {
    width: 23%;
    float: left;
}

.content {
    width: 77%;
    float: right;
}


Hope I helped.


This sort of helped, it only took longer for the content to get behind the navigation (below)

[ Register or Signin to view external links. ]

Do you think if i put padding on the left of the content it would stop once it hits the padding?


Hmm.. It shouldn't do that, it's supposed to stay relative to it's parent container hmm..
#6. Posted:
PoisonOak
  • Resident Elite
Status: Offline
Joined: Mar 29, 201212Year Member
Posts: 248
Reputation Power: 11
Status: Offline
Joined: Mar 29, 201212Year Member
Posts: 248
Reputation Power: 11
-CJHaCKerZz- wrote
PoisonOak wrote
-CJHaCKerZz- wrote You must create a holding div,
then inside make two classes. Each one will contain either the sidebar or the content.

So something like this will probably do the trick:

Basic HTML:

<div id="holder">
    <div class="sidebar">
        <!-- Sidebar content in here-->
    </div>
    <div class="content">
        <!-- Content in here-->
    </div>
</div>


CSS:

* {
    margin: 0;
    padding: 0;
}

div#holder {
    width: 100%;
    margin: 0 auto;
}

.sidebar {
    width: 23%;
    float: left;
}

.content {
    width: 77%;
    float: right;
}


Hope I helped.


This sort of helped, it only took longer for the content to get behind the navigation (below)

[ Register or Signin to view external links. ]

Do you think if i put padding on the left of the content it would stop once it hits the padding?


Hmm.. It shouldn't do that, it's supposed to stay relative to it's parent container hmm..


Yeah i tried everything. I'm just going to let it go for now, i'm working on my account system at the moment
Jump to:
You are viewing our Forum Archives. To view or take place in current topics click here.