SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Thread: HTML css

  1. #1
    SitePoint Zealot
    Join Date
    Mar 2007
    Posts
    106
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    HTML css

    Hi

    I am trying to learn css styles a little more. I have made this website with three columns.

    http://scarboroughphotos.110mb.com/surfers/surfcity.php


    The columns are made with tables but I am trying to remake the site without tables. How could I remake the site with three columns using divs.

    1. the left colum is 109px
    2. the right column is 109px.
    3. the middle column would be about 400px

    Hopefully the site would also align itself to the centre when the browser was expanded. I have tried to look through examples to see how they centre the entire website in the middle of the page. Is it linked to auto?

    For the columns do I use the left margin to set the left point?

  2. #2
    SitePoint Enthusiast
    Join Date
    Feb 2007
    Location
    Swindon, UK
    Posts
    50
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    This should be in the CSS forum, not the PHP forum

    But nevertheless, to center align three colomns, you would do this:
    HTML Code:
    <style>
    .container {width:624px;margin:0 auto 0 auto;}
    .colleft {width:109px; float:left;border:1px solid black}
    .colmid {width:109px; float:left;border:1px solid black}
    .colright {width:400px;float:right;border:1px solid black}
    </style>
    
    <div class='container'>
    <div class='colleft'>This</div>
    <div class='colmid'>Is</div>
    <div class='colright'>A Test</div>
    </div>

  3. #3
    SitePoint Zealot
    Join Date
    Mar 2007
    Posts
    106
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks

    sorry to get the wrong forum. Tried to find the html forum. Its actually the web design forum.


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
  •