SitePoint Sponsor

User Tag List

Results 1 to 15 of 15

Hybrid View

  1. #1
    SitePoint Zealot LORDGreg's Avatar
    Join Date
    May 2001
    Location
    Ptuj, Slovenia
    Posts
    121
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hello.. i'm trying to make a style sheet like this:

    #Menu {
    COLOR: #FFFFFF;
    BACKGROUND-COLOR: #7093DB;
    LEFT: 0px;
    TOP: 100px;
    WIDTH: 150px;
    }

    looks great and everything, but i like it to be from the TOP (100px) to absolute bottom!

    with this i mean, like margin bottom=0 i hupe you understand. this is just a menu, that will last as long the text in some other style sheet is..

    so, i added HEIGHT: 100%; in the #Menu, but this isn't right. Can someone please tell me, with what must i replace that 100% by HEIGHT??

    Thank you all
    lordgreg, sloreactor.com
    http://www.sloreactor.com/

  2. #2
    SitePoint Wizard silver trophy TheOriginalH's Avatar
    Join Date
    Aug 2000
    Location
    Thailand
    Posts
    4,811
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Sorry, can't answer that. I'll dig out my CSS book tomorrow if no-one has answered - Just wanted to say hi and welcome.

    H
    ~The Artist Latterly Known as Crazy Hamster~
    922ee590a26bd62eb9b33cf2877a00df
    Currently delving into Django, GIT & CentOS

  3. #3
    SitePoint Zealot LORDGreg's Avatar
    Join Date
    May 2001
    Location
    Ptuj, Slovenia
    Posts
    121
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Anyone, help me please..

    btw: TheOrignialH thanks
    lordgreg, sloreactor.com
    http://www.sloreactor.com/

  4. #4
    You talkin to me? Anarchos's Avatar
    Join Date
    Oct 2000
    Location
    Austin, TX
    Posts
    1,438
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You'd need to grab the height of the window and set the height of the layer to it using javascript. Check out http://www.dansteinman.com/dynduo

  5. #5
    pg for mild peril cow's Avatar
    Join Date
    Mar 2000
    Location
    nevada, usa
    Posts
    636
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    you can use the padding property:

    {padding: 20px;} will produce a 20 pixel pad on all sides

    or use each separately to control each side:

    {padding-top: 20px;}
    {padding-bottom: 20px;}
    {padding-left: 20px;}
    {padding-right: 20px;}

  6. #6
    SitePoint Wizard creole's Avatar
    Join Date
    Oct 2000
    Location
    Nashvegas Baby!
    Posts
    7,845
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    greg...

    ok...I took your snippet and tried it out myself. First of all if you change your code like so, then it works properly:

    #Menu {
    COLOR: #FFFFFF;
    BACKGROUND-COLOR: #7093DB;
    LEFT: 100px;
    TOP: 100px;
    WIDTH: 150px;
    height: 100%;
    position: relative;
    }

    You left out the position attribute. Maybe you did that intentionally, I don't know. but it works like that. The only problem is that when you use that method, it places the MENU item into the regular flow of the page and I assume that you don't want that.

    The only way that I can think of would be to use Javascript to calculate the height of the window like so:

    1) create your menu
    2) when you get to the line where you set the height, use a javascript function call
    3) The function would:
      a) calculate the height of the browser window
      b) subtract the height from 100 (which is how far your menu is from the top
      c) Use a document.write to write the difference into the CSS
      d) Use a function to reload the page if the window is resized. That way when someone changes the resolution of the browser window, the menu item will always be the proper height.

    Here's a script that might help you get started:
    <script language="JavaScript"><!--
    var height, width;

    if (document.all)
    height = document.body.offsetHeight, width = document.body.offsetWidth;
    else if (document.layers)
    height = window.innerHeight, width = window.innerWidth;
    //--></script>

    Here's a few URL's so get you started too:
    http://www.sitepointforums.com/searc...der=descending
    Adobe Certified Coldfusion MX 7 Developer
    Adobe Certified Advanced Coldfusion MX Developer
    My Blog (new) | My Family | My Freelance | My Recipes

  7. #7
    SitePoint Zealot LORDGreg's Avatar
    Join Date
    May 2001
    Location
    Ptuj, Slovenia
    Posts
    121
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    CSS...

    I tried with that javascript.. but it looks like, i screwed up...

    here is my site click here

    someone gived me also that url for javascript that i think it is the best for this, but just don't know where to give it.. click here

    can someone please check that??

    if you still don't know what am i talking about scroll down on my site and check the menu on the left..

    Gregor
    lordgreg, sloreactor.com
    http://www.sloreactor.com/

  8. #8
    SitePoint Wizard creole's Avatar
    Join Date
    Oct 2000
    Location
    Nashvegas Baby!
    Posts
    7,845
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    greg...it's a cool effect but why don't you just make a tiling background? Or a TD filled with that nice blue color? That would be much easier.
    Adobe Certified Coldfusion MX 7 Developer
    Adobe Certified Advanced Coldfusion MX Developer
    My Blog (new) | My Family | My Freelance | My Recipes

  9. #9
    SitePoint Zealot LORDGreg's Avatar
    Join Date
    May 2001
    Location
    Ptuj, Slovenia
    Posts
    121
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    a tiling background?? could you show me an example please?
    or a table you mean?? well... i thought the css is easier to use with that kind of stuff
    lordgreg, sloreactor.com
    http://www.sloreactor.com/

  10. #10
    SitePoint Wizard creole's Avatar
    Join Date
    Oct 2000
    Location
    Nashvegas Baby!
    Posts
    7,845
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    CSS is not necessarily easier, just more efficient.

    As for a background, look at this image:
    http://www.booksamillioninc.com/images/background.gif

    And you will sort of see what I am talking about. You create an image that has a section on the left that is your blue color and whatever width you want then you set that as the page background and it tiles. Snag that image, then set that as a background in a test page and you will see what I mean.
    Adobe Certified Coldfusion MX 7 Developer
    Adobe Certified Advanced Coldfusion MX Developer
    My Blog (new) | My Family | My Freelance | My Recipes

  11. #11
    SitePoint Zealot LORDGreg's Avatar
    Join Date
    May 2001
    Location
    Ptuj, Slovenia
    Posts
    121
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thanks creole.. i didn't know what do you mean by tiling background.. anyways.. i fixed that css and will now use rather TABLE's on the left and on the right side..

    i will tell you whan i will upload it..
    lordgreg, sloreactor.com
    http://www.sloreactor.com/

  12. #12
    SitePoint Wizard creole's Avatar
    Join Date
    Oct 2000
    Location
    Nashvegas Baby!
    Posts
    7,845
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Greg...

    just to make sure that you don't misunderstand me...I am not saying that CSS is bad or that you should not use it. CSS is a beautiful thing and ocne it works properly in all browsers then I will happily use CSS for layout. THe fact is though that you have to hack at CSS just like you have to hack at tables. The only difference is that EVERY browser on the market today understands TABLES. Only a few get CSS even cloe to right.
    Adobe Certified Coldfusion MX 7 Developer
    Adobe Certified Advanced Coldfusion MX Developer
    My Blog (new) | My Family | My Freelance | My Recipes

  13. #13
    SitePoint Zealot LORDGreg's Avatar
    Join Date
    May 2001
    Location
    Ptuj, Slovenia
    Posts
    121
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    creole:

    i understand you.. i have allready discovered the fantastic world of CSS. i also know about some stuff not working in all browsers etc.. offcourse i will leave some of my code moded by css, but other will be in tables.. you will se what am i talking about..
    lordgreg, sloreactor.com
    http://www.sloreactor.com/

  14. #14
    SitePoint Wizard creole's Avatar
    Join Date
    Oct 2000
    Location
    Nashvegas Baby!
    Posts
    7,845
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    good...looking forward to seeing the results.
    Adobe Certified Coldfusion MX 7 Developer
    Adobe Certified Advanced Coldfusion MX Developer
    My Blog (new) | My Family | My Freelance | My Recipes

  15. #15
    The Hiding One lynlimz's Avatar
    Join Date
    Jul 2000
    Location
    Singapore
    Posts
    2,103
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    just popping my head in..haha
    and here's another happy css user! yeehaw!
    "Imagination is more important than knowledge. Knowledge is limited. Imagination encircles the world."
    -- Albert Einstein


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
  •