Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

CSS question

  • 21-02-2008 11:09PM
    #1
    Registered Users, Registered Users 2 Posts: 5,360 ✭✭✭


    Hey.

    Just wondering if this is easy to do without adding to much code.

    I have a sample page done http://www.davidstokes.com/work/test
    never mind the colour and text it's all for sample !

    What i want to do it have the area on the right in brown be the same height as the main content area, I know i could set the height in the CSS file .. but its going to be different on every page !. so that wont work .. I tried setting height to Auto it didnt work and also to inherit as well but it didnt work.

    Any simple fix ?


Comments

  • Closed Accounts Posts: 18,163 ✭✭✭✭Liam Byrne


    CSS won't do this on its own.

    The usual trick for this is to use a background image to "create" the brown-and-white area.

    Alternatively, look at having jQuery check the height and set all of the columns to the maximum height found.


  • Registered Users, Registered Users 2 Posts: 9,579 ✭✭✭Webmonkey


    Or...
    <script type="text/javascript">
    //<![CDATA[
    onload = function() {
    document.getElementById('right').style.height=
    document.getElementById('main').style.height=
    (document.getElementById('wrapper').offsetHeight)+"px";
    }
    //]]>
    </script>
    


  • Closed Accounts Posts: 7,144 ✭✭✭DonkeyStyle \o/


    Set #right to 800px wide... put the #main <div> inside the #right <div> and set the #main background colour to white.


  • Registered Users, Registered Users 2 Posts: 5,360 ✭✭✭NeVeR


    I'll try all those.
    Thank guys,


Advertisement