Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.
Hi all, please see this major site announcement: https://www.boards.ie/discussion/2058427594/boards-ie-2026

css help

  • 24-02-2008 02:53PM
    #1
    Registered Users, Registered Users 2 Posts: 872 ✭✭✭


    Hi,

    Please see attached image, i am trying to make the quickguide div stay on the right and have the 3 hotel divs wrap themselves around it (their width is 100% so i thought they would just wrap around the quickguide div that floats right.

    Maybe it's a clear:right issue or something similar.

    Any ideas ?

    Thanks


Comments

  • Registered Users, Registered Users 2 Posts: 3,594 ✭✭✭forbairt


    Hmmm I'm guessing the quick div is absolutely positioned ? or ?

    Try giving your hotel divs a margin-right: 250px .. or whatever size the quick div is plus a bit


  • Registered Users, Registered Users 2 Posts: 872 ✭✭✭grahamor


    Thanks forbairt,

    I havent specified any absolute positioning.

    I could set the margin-right to 250px for the hotel div's but say the quick div is 500px in height; and there are 10 hotel divs ( about 1500px in height in total) i want the hotel divs under the quick div to expand 100% of the width available.

    I hope i am being clear

    Thanks


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


    I tried doing it in just css, but gave up.
    If the quickguide div is a fixed height, what I'd do in this case is cheat a bit with php and specify the first n rows should be only x% wide until they've cleared the quickguide.

    Something like:
    <div class="hotelrow narrow">
    <div class="hotelrow narrow">
    <div class="hotelrow narrow">
    <div class="hotelrow narrow">
    <div class="hotelrow">
    <div class="hotelrow">
    <div class="hotelrow">
    <div class="hotelrow">


  • Registered Users, Registered Users 2 Posts: 35,522 ✭✭✭✭Gordon


    The closest I got was by stating the hotel divs as display:table-cell; but as I don't understand what that means I couldn't work out why only the first div would fit until the left edge of the quickdiv and the rest would bunch up on the same row as the first. display:table-row; gave me some results also but removed the border style for some reason.

    Might be something to look into for someone with a greater knowledge though.


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


    Gordon wrote: »
    display:table-cell; but as I don't understand what that means [...]
    I have to say this is the first I've seen of this display:table malarkey... is this part of a more recent css spec? or have I just been living under a rock :confused:

    /dons Sherlock Holmes hat and wanders off to google to investigate


  • Advertisement
Advertisement
Advertisement