Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    New Coder
    Join Date
    May 2009
    Posts
    10
    Thanks
    3
    Thanked 0 Times in 0 Posts

    external style sheet question

    Code:
    #mainContent  {
    	margin-top: 18px;
    	margin-right: 220px;
    	margin-bottom: 0px;
    	margin-left: 230px;
    	padding-top: 0;
    	padding-right: 10px;
    	padding-bottom: 0;
    	padding-left: 10px;
    	height: 500px;
    }
    Is there a way where i can make the height code to say auto if over 500px if not 500px? Thanks

  • #2
    Master Coder Excavator's Avatar
    Join Date
    Dec 2006
    Location
    Alaska
    Posts
    9,667
    Thanks
    22
    Thanked 1,827 Times in 1,811 Posts
    Hello akolyte,
    Check out min-hieght
    Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
    Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad

  • Users who have thanked Excavator for this post:

    akolyte (11-13-2009)

  • #3
    Regular Coder
    Join Date
    Nov 2009
    Posts
    110
    Thanks
    7
    Thanked 9 Times in 9 Posts
    Code:
    height:auto;
    min-height:500px;
    Then use a conditional comment to load a style sheet only for ie6 that has
    Code:
    height:500px;
    ie6 can't do min-height, but it treats height almost the same as min-height should be treated (making the height 500px but still allowing it to grow if its contents flow longer than that). So we give the height:500
    only to ie6.

    This should work but it depends on where the div is in relation to other elements on the page and getting height to work as it should can be really tricky.

    Edit: Oops, I guess I was typing while Excavator was posting..
    Last edited by linehand; 11-13-2009 at 06:11 PM.

  • #4
    New Coder
    Join Date
    May 2009
    Posts
    10
    Thanks
    3
    Thanked 0 Times in 0 Posts

  • #5
    Master Coder Excavator's Avatar
    Join Date
    Dec 2006
    Location
    Alaska
    Posts
    9,667
    Thanks
    22
    Thanked 1,827 Times in 1,811 Posts
    Quote Originally Posted by akolyte View Post
    Have you seen that on a wider resolution?

    If you move that closing tag for #container down to enclose your ap sidebars they will take their positioning from #container instead of the body.
    Like this -
    Code:
        3. Once you approve your design, we'll program the page for you.
        <br>
        <br>
       </h3>
     
      <p><a href="testimonials.html">See what our clients</a> have to say about our expertise in all of these services. </p>
      <p>Please contact us today and schedule a free website consultation to take your search engine marketing to the next level!</p>
    
      </div>
      <div id="footer">
        <!-- end #footer -->
        <div id="copyright">
          <address>Pinellas Website Design, Inc. Copyright   2009. All rights   reserved</address>
        </div>
      </div>
    /*removed closing tag*/
    <div id="sidebar_left_bottom">
     <h1>Web Design  </h1>
     <p> Every great website starts with a great design. At Pinellas Website Design, we don't just design a website for you, we design your website, capturing the essence of who you are as a company.</p>
      <h1><br>
      E-Commerce Web Design</h1>
      <p>A website with an appealing design is good, but a website that goes to work for you is even better. Create a cost-effective platform to sell your products anywhere in the world.</p>
      <h1><br>
      Search Engine Optimization (SEO)  </h1>
      <p>You have a website, you like how it looks, and you like what it does, but how do you get your potential customers to find it? Successful search engine optimization ensures your site is in the right place at the right time.</p>
    </div>
    <div id="right_sidebar_bottom">
      <h1>Tesimonials<br>
      </h1>
      <hr size="2">
      <h1>    <br>
      </h1>
      <p>Finding a Web Designer can be a daunting task. Luckily our company was fortunate enough to find the perfect designers at Pinellas Website Design. </p>
      <p>&nbsp;</p>
      <hr>
      <p>&nbsp;</p>
      <p>The insight and assistance you provided proved invaluable to us. The website not only turned out beautifully but has assisted to improve our clientele and boost our business sales. <br>
      </p>
      <p>&nbsp;</p>
      <hr>
      <p>&nbsp;</p>
      <p>When needing a Web Designer in the future, there is no other company I would rather work with. Thank you for everything!<br>
        <br>
        <br>
      </p>
      <hr>
      <p>&nbsp; </p>
    </div>
    <div id="sidebarleftbottom"></div>
    <div id="testimonials">
      <h1>&nbsp;</h1>
    <br>
    </div>
    <div id="Accordion1" class="Accordion" tabindex="0">
      <div class="AccordionPanel"> </div>
    <!-- end #container --></div>
    Last edited by Excavator; 11-13-2009 at 06:43 PM. Reason: removed extra closing tag line 215
    Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
    Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •