SitePoint Sponsor

User Tag List

Results 1 to 6 of 6

Thread: CSS HTML

  1. #1
    SitePoint Enthusiast xarzu's Avatar
    Join Date
    Apr 2007
    Posts
    72
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    CSS HTML

    Hello forum. I have inherited a project. It uses CSS to format the body of the web page.

    Its appearance needs reworking. Right now it looks like a bock plopped in the middle of the browser window. I want it to have nice borders and a header going across the top and the bottom.

    Here is what it looks like now:


    Here is what I would like it to look like:


    I am not as experienced with CSS as I would like to be. But I was able to dig into the code and find where the html was formatted. I am writing this post now because I would prefer if this design was on a table rather than on the entire HTML page.

    The CSS element "html" is defined ni a "main.css" file like this:

    html{background-color:#eee;padding:0px;overflow:auto;height:100%;}html body,html form{background-image:url('../images/body-background.gif');
    width:1200px;margin:0px auto;box-shadow:0 0 15px 15px #bbbbbb;padding:0px;}
    the image
    ../images/body-background.gif
    is not the background of the whitespace on the right and left. This gif file is the background of the block in the middle.

    So, how do I make this declaration a table declaration instead of a declaration and format for the entire page? And once this change has been made, what sort of corresponding code changes do I need to do in other code files?

  2. #2
    SitePoint Mentor bronze trophy
    ronpat's Avatar
    Join Date
    Jun 2012
    Location
    NJ, USA
    Posts
    2,466
    Mentioned
    61 Post(s)
    Tagged
    2 Thread(s)
    If you can post a link to the site, we will be able to provide much better advice than if we have to guess about the code. It is unlikely that a table is what you actually need. Tables are intended to be used for rows and columns of data and are very poor devices for laying out a page.

  3. #3
    SitePoint Enthusiast xarzu's Avatar
    Join Date
    Apr 2007
    Posts
    72
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by ronpat View Post
    If you can post a link to the site, we will be able to provide much better advice than if we have to guess about the code. It is unlikely that a table is what you actually need. Tables are intended to be used for rows and columns of data and are very poor devices for laying out a page.
    It is http://webtest.seattleu.edu/FIS-PTContracts/

    It tables are poor choices for laying out the page, I guess I will have to modify the html declaraton in the css file.

  4. #4
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,114
    Mentioned
    448 Post(s)
    Tagged
    8 Thread(s)
    Your link doesn't work for me. Can you check it?
    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."

  5. #5
    SitePoint Enthusiast xarzu's Avatar
    Join Date
    Apr 2007
    Posts
    72
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I will check that.

    If usig a table to encapsulate a block on a page, what should I use? A <div> ? How can I declare a block centered and against the top of the page?

  6. #6
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,114
    Mentioned
    448 Post(s)
    Tagged
    8 Thread(s)
    I don't quite understand the questions, but unless you are presenting tabular data, don't use a table. Tables are harder to work with anyway. Let's get that link fixed first.
    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
  •