SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Guru
    Join Date
    Sep 2004
    Location
    Provo, UT
    Posts
    858
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Trying to eliminate the use of tables in favor of CSS

    After 8 years of using tables it's time to implement CSS. Below is my practice page. I have a div on the left as a placeholder for google ads. Next to that I have a content div that will display the bulk of the text. I'm not sure how to make the size of the div dynamic. Some pages will have lots of text, others will have a paragraph or two. And in my CSS I can only see a property for height and width. Is this even possible to make the size of a div dynamic?

    Thanks!

    http://www.oil-testimonials.com/cssPractice.php
    Convert your dollars into silver coins. www.convert2silver.com

  2. #2
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,097
    Mentioned
    448 Post(s)
    Tagged
    8 Thread(s)
    Hi busy boy. Divs are actually dynamic by default; it's just CSS that can stop that behavior (such as by setting a fixed width). Setting a % width returns it to a kind of dynamic behavior. It might be best if you post a screen shot of what you are aiming for and we can suggest how to go about it. Do you want the design centered? Whether yes or no, it's a good idea to wrap everything in a single div that sets the overall width--be that fixed or fluid.
    Facebook | Google+ | Twitter | Web Design Tips | Free Contact Form

    Forum Usage: Tips on posting code samples, images and more

    Forrest Gump: "IE is like a box of chocolates: you never know what you're gonna get."


Bookmarks

Posting Permissions

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