Results 1 to 7 of 7

Thread: newbie need CSS help

  1. #1
    Join Date
    Apr 2007
    Posts
    59
    Thanks
    7
    Thanked 0 Times in 0 Posts

    Default newbie need CSS help

    I want a CSS for my site but I'm tired of searching the net for solutions. Your help is needed.
    Safari browser place the page correctly in the middle, IE doesn't.
    My site is 1000px width and should be center in the middle of the browser, working on IE, Safari and FF.
    My table-layout has two rows: the first one has 5 cells with the same width where I have my links, the second rows has one cell where I load a image. Can someone help me ?

    www.paolinet.info/aude/cours_enfants_new.html

    Thank you

  2. #2
    Join Date
    Aug 2005
    Location
    Other Side of My Monitor
    Posts
    3,494
    Thanks
    5
    Thanked 105 Times in 104 Posts
    Blog Entries
    1

    Default

    It's mainly because you are using tables for layout. That's a no-no. But in your page, easily fixed.

    First open your page to edit and find this:

    Code:
    <body>
    Make it look like this:

    Code:
    <body>
    <div id=theWrap">
    Than find this:

    Code:
    </body>
    and make it look like this:

    Code:
    </div>
    </body>
    Next find this near the top:

    Code:
    <style type="text/css">
    <!--
    a:link {
    Make it look like this:

    Code:
    <style type="text/css">
    <!--
    
    #theWrap {
    width: 1000px;
    margin-left: auto;
    margin-right: auto;
    }
    
    a:link {
    save, re-upload, refresh the page and see if that helps.
    {CWoT - Riddle } {Freelance Copywriter} {Learn to Write}
    Follow Me on Twitter: @InkingHubris
    PHP Code:
    $result mysql_query("SELECT finger FROM hand WHERE id=3");
    echo 
    $result

  3. #3
    Join Date
    Apr 2007
    Posts
    59
    Thanks
    7
    Thanked 0 Times in 0 Posts

    Default

    Thank you. There is still a problem with centering the entire <div> in the middle of the browser's window in IE. The alignment is still on the left. Also strange is the fact that with your CSS change the browser Safari does not load the image. Opera and Camino does.
    As a Mac user I never use IE, but this browser seems to give headache to many people trying to develop a website.

  4. #4
    Join Date
    Apr 2007
    Posts
    59
    Thanks
    7
    Thanked 0 Times in 0 Posts

    Default

    I think that the problem of centering has to do with the fact that I have a table-layout.

  5. #5
    Join Date
    Aug 2005
    Location
    Other Side of My Monitor
    Posts
    3,494
    Thanks
    5
    Thanked 105 Times in 104 Posts
    Blog Entries
    1

    Default

    That's part of it. The tables I mean. The other part is you are using element level CSS (putting declaration on each element).

    If you take all the CSS and put it in a separate sheet, it will be easier to set up and control. You can see where it is getting broken and such.
    {CWoT - Riddle } {Freelance Copywriter} {Learn to Write}
    Follow Me on Twitter: @InkingHubris
    PHP Code:
    $result mysql_query("SELECT finger FROM hand WHERE id=3");
    echo 
    $result

  6. #6
    Join Date
    Apr 2007
    Posts
    59
    Thanks
    7
    Thanked 0 Times in 0 Posts

    Default

    O.k. I will change my page layout. Instead of a table I will be using <div> tags.
    I tried to convert a table with one row and three cells where I have three links but the cells are vertical. How to have them on the same row?
    <div>
    <div>link1</div>
    <div>link2</div>
    <div>link3</div>
    </div>


    Thanks

  7. #7
    Join Date
    Aug 2005
    Location
    Other Side of My Monitor
    Posts
    3,494
    Thanks
    5
    Thanked 105 Times in 104 Posts
    Blog Entries
    1

    Default

    In the CSS you can either display:inline OR you can float:left the 3 dives inside the container div.
    {CWoT - Riddle } {Freelance Copywriter} {Learn to Write}
    Follow Me on Twitter: @InkingHubris
    PHP Code:
    $result mysql_query("SELECT finger FROM hand WHERE id=3");
    echo 
    $result

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
  •