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 10 of 10

Thread: css page size

  1. #1
    New Coder
    Join Date
    Apr 2006
    Posts
    53
    Thanks
    0
    Thanked 0 Times in 0 Posts

    css page size

    hi
    this is probably very simple for most of you but i seem to be struggling with it.
    ive done a css but i dont know how to use it to ensure that all my pages fill the whole screen length wise (i hope that makes sense).
    width wise they are all equal but length wise some are shorter than the rest.

    this is what it looks like at the moment:

    /* Simple style */
    body {
    margin: 0px;
    }
    a {
    text-decoration: none;
    }
    a:hover {
    text-decoration: underline ;
    }

    .page_heading {
    color: #FFFFFF;
    font-family: "Times New Roman", serif;
    font-size: 22pt;
    text-align: center;
    padding: 5px 0px;
    }

    span.white a {
    color: #FFFFFF;
    }

    .buttonscontainer {
    width: 200px;
    }

    .buttons a {
    color: #000000;
    background-color: #6699FF;
    padding: 2px;
    padding-left: 3px;
    display: block;
    border-bottom: 1px solid #0066CC;
    font: 13px Arial, sans-serif;
    font-weight: bold;
    text-decoration: none;
    text-align: left;
    }

    .buttons a:hover {background-color: #0066CC;
    color: #FFFFFF;
    text-decoration: none;
    }

    its very simple and im just using it to hopefully make the pages the same size and for my menu system.
    Thanks

  • #2
    The fat guy next door VIPStephan's Avatar
    Join Date
    Jan 2006
    Location
    Halle (Saale), Germany
    Posts
    8,623
    Thanks
    6
    Thanked 1,001 Times in 974 Posts
    Plain CSS doesn't say anything without the HTML code it's referring to. Give us a little more to work with please.

    If I understood you right, you want your page always extend to the bottom of the screen even if ther's less content?
    height: 100%; might do it if you apply it to the body and the html:
    Code:
    html, body {height: 100%}
    But you still need it to apply to the content itself which I can't help you without you providing your HTML...

    Oh and always use [code][/code] tags to post your code here (or press the little "#" button in the post window).
    Last edited by VIPStephan; 04-25-2006 at 12:18 PM.

  • #3
    Regular Coder BonRouge's Avatar
    Join Date
    Mar 2006
    Location
    Sendai, Japan
    Posts
    328
    Thanks
    0
    Thanked 0 Times in 0 Posts
    CSS is used to style HTML. I have no idea what your page looks like or what your problem is because you've posted no HTML. Some people are mind readers. Some people code web pages. Unfortunately, not many people do both.

  • #4
    New Coder
    Join Date
    Apr 2006
    Posts
    53
    Thanks
    0
    Thanked 0 Times in 0 Posts
    lol
    ok yeh that is what i want to do.
    umm ok this is what my basic html page looks like:

    <?php

    require_once("config.php");
    $connection = @mysql_connect($db_host, $db_user, $db_password) or die("oops! error connecting");
    ?>
    <html>
    <head>
    <title><?php echo "Search" ?></title>
    <head>
    <body>

    <table border="1" width="100%" height="226">
    <tr>
    <td width="22%" height="91" bgcolor="#0099FF">&nbsp;</td>
    <td width="78%" height="91" bgcolor="#66CCFF" ALIGN=CENTER>&nbsp;

    <H1> Search </H1>

    </td>
    </tr>
    <tr>
    <td width="22%" height="123" bgcolor="#6699FF">&nbsp;
    <div class="buttonscontainer">
    <div class="buttons">
    <a href="manage_pay.php">Manage Payment</a>
    <a href="ownerhomepage.php">Owner Homepage</a>
    <a href="logout.php">Logout</a>
    </div>
    </div>
    </td>
    <td width="78%" height="123" bgcolor="#99CCFF" ALIGN=CENTER>

    <p>&nbsp;</p>
    <p>&nbsp;</p>

    <p>&nbsp;</p>

    <p>&nbsp;</p>
    <p>&nbsp;</p>
    <p>&nbsp;</p>
    <p>&nbsp;</p>
    <p>&nbsp;</p>
    <p>&nbsp;</p>
    <p>&nbsp;</p>
    <p>&nbsp;</p>
    <p>&nbsp;</p>
    <p>&nbsp;</p>

    </form>
    </td>



    </table>


    </body>

    </html>

    hope thats what u meant..thanks

  • #5
    Regular Coder BonRouge's Avatar
    Join Date
    Mar 2006
    Location
    Sendai, Japan
    Posts
    328
    Thanks
    0
    Thanked 0 Times in 0 Posts

  • #6
    New Coder
    Join Date
    Apr 2006
    Posts
    53
    Thanks
    0
    Thanked 0 Times in 0 Posts
    hi
    i tried doing some stuff from that aswell like adding the #wrap for internet explorer and stuff but it still doesnt work.
    do i need to change nething on my html except having the line:

    <link rel="stylesheet" type="text/css" href="template2.css">

  • #7
    The fat guy next door VIPStephan's Avatar
    Join Date
    Jan 2006
    Location
    Halle (Saale), Germany
    Posts
    8,623
    Thanks
    6
    Thanked 1,001 Times in 974 Posts
    Excuse me when I sound a little harsh but: What are you talking about??
    Quote Originally Posted by puja
    [...] adding the #wrap for internet explorer and stuff [...]
    The #wrap isn't just for internet explorer or to look good in your HTML... it isn't done by adding something here and there. I guess what BonRouge was implying with his link is to say that you should recode the page from scratch using valid, up-to-date HTML markup and CSS to style the page.
    [...] do i need to change nething on my html [...]
    Not just anything, almost everything!

    <link rel="stylesheet" type="text/css" href="template2.css">
    Where do you have that from? Is that your CSS file? It's not in the HTML you posted...?

    Do you have an image to show us how it should look like in the end?

  • #8
    New Coder
    Join Date
    Apr 2006
    Posts
    53
    Thanks
    0
    Thanked 0 Times in 0 Posts
    so ur saying i shud change my whole style sheet?
    it works fine at the moment, it just doesnt fill the page 100%.
    and i realised that the line i posted wasnt part of my html code which is y i posted it to show how i was linking the two.
    they link fine and work fine so what are u suggesting i need to change on my html code?

  • #9
    The fat guy next door VIPStephan's Avatar
    Join Date
    Jan 2006
    Location
    Halle (Saale), Germany
    Posts
    8,623
    Thanks
    6
    Thanked 1,001 Times in 974 Posts
    What I'm saying is that your HTML code just isn't very good. Using tables to layout a page is outdated and you should aim for tableless code (except you actually have tabular data like sports results or something like that).

    It's good that you use CSS but it can't deploy it's full potential with such HTML code. Look at the link BonRouge supplied and find what kind of page layout (2 column/3column....) fits best for you. And then look at the code there and how this is done (completely without tables)

    By the way: There is a closing </form> tag in the code you provided but I don't see an opening tag?

    And to remind you: When you provide code the next time here put it in between [CODE][/CODE] tags!

  • #10
    New Coder
    Join Date
    Apr 2006
    Posts
    53
    Thanks
    0
    Thanked 0 Times in 0 Posts
    thanks for the advice but im doing this as part of an acedemic project and rather than the layout it it concentrated more on the functionality.
    also i dont really have time to change the layout now
    thanks anyway for trying 2 help


  •  

    Posting Permissions

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