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 12 of 12
  1. #1
    New Coder
    Join Date
    Dec 2005
    Location
    Derby, UK
    Posts
    17
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Unhappy Why does my DIV sometimes appear below another and sometimes not, seemingly randomly?

    Hey there... I have a problem.

    On my site's blog (http://www.orangeacid.net/blog, powered by wordpress), I have a problem with the layout.

    I have opted for the xHTML/CSS/DIV method as opposed to just HTML and tables, and now, after a quick under-the-hood redesign of my site, sometimes the navigation DIV (on the right) chooses to display itself with the right alignment but directly under my content DIV (on the left).

    This only happens on my blog page and only most of the time - after a few refreshes sometimes it works out fine. My structural stylesheet is at http://www.orangeacid.net/stylesheets/structure.css, and there is another one for blog based elements at http://www.orangeacid.net/stylesheets/blog.css, although the blog one is a little empty.

    I have tried resizing the navigation DIV to unrealistically narrow widths and it still sometimes happens, so I'm not so sure about it just being that sometimes one of the DIVs is too wide.

    I would really, really appriciate some help with this as it is driving me insane.

    Thanks,

    Dan Foy
    orangeacid.net

  • #2
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    I can't replicate the problem.

  • #3
    New Coder
    Join Date
    Dec 2005
    Location
    Derby, UK
    Posts
    17
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Hmm I have a more annoying bug. The permalinks on the blog homepage all look like they should (i.e. no underlines), but the ones on the permalinks don't, even though they use the same class. Hmm...

    Can anyone help me out?

  • #4
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    Its like you expect us to know what your permalinks are. Can you be more specific please?

  • #5
    New Coder
    Join Date
    Dec 2005
    Location
    Derby, UK
    Posts
    17
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Lol the permalink thing seems to have solved itself. I still have a problem with the divs repositioning seemingly randomly though... any help from anyone would be appriciated...

  • #6
    New Coder
    Join Date
    May 2005
    Posts
    94
    Thanks
    4
    Thanked 0 Times in 0 Posts
    I had the same problem as this with a few sites that I developed. Never could find anyone who could help.

    However, after HOURS of trying various things, i found that the answer was...

    PHP Code:
    <div id="container">
    <
    div id="rightcolumn"></div>
    <
    div id="leftcolumn"></div>
    </
    div
    with the following css

    PHP Code:
    #container{
    width100%;
    heightauto;
    }

    #rightcolumn{
    width200px//or whatever width you need
    heightauto;
    floatright;
    clearnone;
    }

    #leftcolumn{
    width450px//or whatever width you need
    heightauto;
    floatleft;
    clearnone;


  • #7
    New Coder
    Join Date
    Dec 2005
    Location
    Derby, UK
    Posts
    17
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Wow, cheers, you're a lifesaver!

    The clear thing does make sense, I'll try it out now. I hav jus realised that its only a IE bug, which is annoying...

  • #8
    New Coder
    Join Date
    Dec 2005
    Location
    Derby, UK
    Posts
    17
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Smile Cheers!

    Yep, that seems to have done the trick. Add 10 points to your 'I'm really cool and helpful-o-meter'

  • #9
    New Coder
    Join Date
    Dec 2005
    Location
    Derby, UK
    Posts
    17
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Oh, no, it hasn't

    Any other ideas? Please, I'm getting desperate...

    I have deduced that it only affects php pages. The nav bit is a php include if that helps.
    Last edited by orangeacid; 12-15-2005 at 08:24 PM.

  • #10
    New Coder
    Join Date
    May 2005
    Posts
    94
    Thanks
    4
    Thanked 0 Times in 0 Posts
    PHP Code:
    #sidenavcontainer {
        
    width185px;
        
    heightauto;
        
    margin0px;
        
    padding0px 0px 20px 0px;
        
    background-color#efefef;
        
    positionrelative;
        
    floatright;
      
    top0px
        
    right0px;
        
    text-alignleft;
        
    overflowhidden;
        
    clearnone;

    I'd get rid of "position: relative; top: 0px; right: 0px;" if I were you, with the float: right, there is no need for them. I don't know what to suggest other than that really i'm afraid. Drop me an email if you ever get it sorted, i'd be interested how it turns out (simon [at] snetty [dot] com).

  • #11
    New Coder
    Join Date
    Dec 2005
    Location
    Derby, UK
    Posts
    17
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I removed the float and the site rendered properly sometimes, and other times it apeared underneath but on the left. Kinda like as if it hadn't got enough space.

    I am beginning to think more and more that perhaps this is a php-related error. Perhaps before an element has fully loaded PHP tells firefox that the link is the full length of the php code, before changing it? Lag could be responsible for why the page displays correctly sometimes and sometimes not...

    Anyone have any ideas how I might get around this then?

    Cheers in advance... if you can help...

  • #12
    New Coder
    Join Date
    Dec 2005
    Location
    Derby, UK
    Posts
    17
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Yeah, it seems to be a php problem... cause the page laid out the same using SSI is fine... but I need php on those pages and you can't parse php with apache and expect it to work properly.

    Or can you?


  •  

    Posting Permissions

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