Results 1 to 6 of 6

Thread: Aligning DIVs horizontal frustration

  1. #1
    Join Date
    Aug 2006
    Posts
    89
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Aligning DIVs horizontal frustration

    Someone please unlock the secret for me LOL



    live site
    http://yakkityyak.x24hr.com/

    Code:
    <div>
    
    <div style='display:inline'></div>
    <div style='display:inline'></div>
    <div style='display:inline'></div>
    
    </div>
    why wont it work??

    i tried to float them as well !!

  2. #2
    Join Date
    May 2007
    Location
    Boston,ma
    Posts
    2,127
    Thanks
    173
    Thanked 207 Times in 205 Posts

    Default

    Should be " and ended with semi colon like so...

    Code:
    <div style="display:inline;"></div>

    That still may not work did you try...

    Code:
    <div style="float:left;"></div>

  3. #3
    Join Date
    Mar 2007
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Try this.

    div
    {
    width:300px;
    margin:2px auto;
    }

    in an external css file or in the <head></head> at the beginning of the html document.

  4. #4
    Join Date
    Aug 2006
    Posts
    89
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by bluewalrus View Post
    Should be " and ended with semi colon like so...

    Code:
    <div style="display:inline;"></div>

    That still may not work did you try...

    Code:
    <div style="float:left;"></div>
    hmm, are you sure you need a ";" as a trailing end? seems to be used as a divider.


    Also does pure html require strict use of double quotations?

    ie. " " " instead of single " ' "

    i didnt think so?

  5. #5
    Join Date
    Aug 2006
    Posts
    89
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by xereu View Post
    Try this.

    div
    {
    width:300px;
    margin:2px auto;
    }

    in an external css file or in the <head></head> at the beginning of the html document.
    so it has to be external and not inline declarations?

  6. #6
    Join Date
    May 2007
    Location
    Boston,ma
    Posts
    2,127
    Thanks
    173
    Thanked 207 Times in 205 Posts

    Default

    ; trailing a command is correct if there are commands after them without them they will be ignored and that command may be as well. I'm not sure about the " or ' but i always use double because that's what i started with and don't see a reason to use the single. Inline is the same as in the head or external external is called as is the head. Your problem maybe that you have an element within the div that has their own line break associated with it.

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
  •