CSS column issue

Discussion in 'CSS' started by ollyno1uk, Jun 5, 2008.

  1. #1
    Hi

    I am very new to CSS

    I am trying to format my blog to have an additional column in the white space. at the moment I can get the column to show in the correct place but only underneath the existing rather than to the right of it.

    I believe from what I can make out, the format is done by increasing or decreasing the margin sizes to get the positioning?

    anyhow my blog is here - http://www.jbosolutions.co.uk/blog - perhaps someone can take a look.

    Cheers in advance
     
    ollyno1uk, Jun 5, 2008 IP
  2. shallowink

    shallowink Well-Known Member

    Messages:
    1,218
    Likes Received:
    64
    Best Answers:
    2
    Trophy Points:
    150
    #2
    Can try changing this:
    /* Begin Sidebar right */
    #rightnav
    {
    padding: 20px 0 10px 0;
    margin-left: 200px;
    width: 190px;
    }

    Take out the margin-left, and put float:left;
    or even float:right; should work.
     
    shallowink, Jun 5, 2008 IP
    ollyno1uk likes this.
  3. ollyno1uk

    ollyno1uk Active Member

    Messages:
    946
    Likes Received:
    27
    Best Answers:
    0
    Trophy Points:
    70
    #3
    Thanks for the speedy response - although using either float:left; or float: right; sends it wayy of teh screen to the right, still beneath the existing menu.
     
    ollyno1uk, Jun 5, 2008 IP
  4. shallowink

    shallowink Well-Known Member

    Messages:
    1,218
    Likes Received:
    64
    Best Answers:
    2
    Trophy Points:
    150
    #4
    Well that's cause the #sidebar which is inside of the #rightnav, has a margin-left: 545px assigned to it. It isn't using floats but margin tricks to achieve its layout. And you are using #sidebar twice, it is supposed to be unique. I would change the second instance of sidebar (the one below the div id="rightnav") to something else, then apply a margin-left to the rightnav of 545 + 190 + whatever other margins/paddings you have applied. (probably at least 40px might be 80px)

    That means copy all of the sidebar style rules and adjust those to preserve what works already.
     
    shallowink, Jun 5, 2008 IP
  5. ollyno1uk

    ollyno1uk Active Member

    Messages:
    946
    Likes Received:
    27
    Best Answers:
    0
    Trophy Points:
    70
    #5
    ok I renamed the div of sidebar to sidebar-right and adjusted the margin-left but it still only appears under the existing menu rather than the side.

    Thanks once again

    edit: - how is it that you can see my css file as well? I'd be interested to learn this!
     
    ollyno1uk, Jun 5, 2008 IP
  6. shallowink

    shallowink Well-Known Member

    Messages:
    1,218
    Likes Received:
    64
    Best Answers:
    2
    Trophy Points:
    150
    #6
    shallowink, Jun 5, 2008 IP
  7. ollyno1uk

    ollyno1uk Active Member

    Messages:
    946
    Likes Received:
    27
    Best Answers:
    0
    Trophy Points:
    70
    #7
    ah right I see - thanks

    No joy unfortuantely. No matter what I set the marrgins to, they adjust but still remain beneath the exisiting mene rather than next to them

    Cheers for your continued help though - most kind
     
    ollyno1uk, Jun 5, 2008 IP
  8. ferman

    ferman Well-Known Member

    Messages:
    968
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    140
    #8
    check the width of the right most column it must be more try to reduce it
     
    ferman, Jun 6, 2008 IP
  9. ollyno1uk

    ollyno1uk Active Member

    Messages:
    946
    Likes Received:
    27
    Best Answers:
    0
    Trophy Points:
    70
    #9
    reduced them both down but still the same - one sits below the other.
     
    ollyno1uk, Jun 6, 2008 IP
  10. shallowink

    shallowink Well-Known Member

    Messages:
    1,218
    Likes Received:
    64
    Best Answers:
    2
    Trophy Points:
    150
    #10
    Looks right on Firefox now.
     
    shallowink, Jun 6, 2008 IP
  11. ollyno1uk

    ollyno1uk Active Member

    Messages:
    946
    Likes Received:
    27
    Best Answers:
    0
    Trophy Points:
    70
    #11
    I managed to get this one solved changing the margin-left to 20px and floating both to the left - sorted

    Thanks for everyone's input
     
    ollyno1uk, Jun 6, 2008 IP