Results 1 to 5 of 5

Thread: [RESOLVED] Why does it look like this???

  1. #1

    Thread Starter
    MS SQL Powerposter szlamany's Avatar
    Join Date
    Mar 2004
    Location
    Connecticut
    Posts
    18,263

    Resolved [RESOLVED] Why does it look like this???

    I'm curious why the "O: Initial Visit" is slightly moved to the right compared to the lines below.

    Is it not appropriate to use <br /> to make a "multi-line" label???

    This is the real "html" code

    Code:
    Chart History
    <br />
    <label class="awc-AmendHist acs-edit-large-text"></label>
    <br />
    The awc-AmendHist class doesn't give any styling - that's used by my jQuery code to wire the label to the data coming from my webservice...

    The acs-edit-large-text class looks like this:

    Code:
    .acs-edit-large-text
    {   width: 210px;
        margin: 3px;
    }
    Firebug shows the dom looking like this when loaded...

    Code:
    <br>
    Chart History
    <br>
    <label class="awc-AmendHist acs-edit-large-text awc-seqEditPanel-0">O: Initial Visit created (2011-10-14 13:23)<br>C: Visit Closed via Submit (2011-10-14 14:09)<br>N: this is a note the next day (2011-10-14 14:12)<br></label>
    <br>
    <br>
    awc-seqEditPanel-0 is another class I pop on in my jQuery code - no styling...

    But the screen looks like this - why the space in front of O: Initial Visit??
    Attached Images Attached Images  

    *** Read the sticky in the DB forum about how to get your question answered quickly!! ***

    Please remember to rate posts! Rate any post you find helpful - even in old threads! Use the link to the left - "Rate this Post".

    Some Informative Links:
    [ SQL Rules to Live By ] [ Reserved SQL keywords ] [ When to use INDEX HINTS! ] [ Passing Multi-item Parameters to STORED PROCEDURES ]
    [ Solution to non-domain Windows Authentication ] [ Crazy things we do to shrink log files ] [ SQL 2005 Features ] [ Loading Pictures from DB ]

    MS MVP 2006, 2007, 2008

  2. #2
    PowerPoster
    Join Date
    Jun 2001
    Location
    Trafalgar, IN
    Posts
    4,141

    Re: Why does it look like this???

    I assume the space is the 3px margin that is only being applied to the first line .

  3. #3

    Thread Starter
    MS SQL Powerposter szlamany's Avatar
    Join Date
    Mar 2004
    Location
    Connecticut
    Posts
    18,263

    Re: Why does it look like this???

    Quote Originally Posted by MarkT View Post
    I assume the space is the 3px margin that is only being applied to the first line .
    Yeah - I kind of realized that after I made this post and saw it all in front of me in one spot...

    What would be the proper element and/or styling for a multi-line label of data??? I kind of wanted that 3px border all around...

    It's all already in a <p> that gets that blue-border formatting by css styling...

    *** Read the sticky in the DB forum about how to get your question answered quickly!! ***

    Please remember to rate posts! Rate any post you find helpful - even in old threads! Use the link to the left - "Rate this Post".

    Some Informative Links:
    [ SQL Rules to Live By ] [ Reserved SQL keywords ] [ When to use INDEX HINTS! ] [ Passing Multi-item Parameters to STORED PROCEDURES ]
    [ Solution to non-domain Windows Authentication ] [ Crazy things we do to shrink log files ] [ SQL 2005 Features ] [ Loading Pictures from DB ]

    MS MVP 2006, 2007, 2008

  4. #4
    Frenzied Member
    Join Date
    Apr 2009
    Location
    CA, USA
    Posts
    1,516

    Re: Why does it look like this???

    The margin on .acs-edit-large-text is not causing the problem here. Label elements are inline by default, which sometimes have extra spacing in some places for reasons I don't entirely know. Also, width is not applied to inline elements, so the width:210px is not doing anything for you. To fix both problems, give display:block to .acs-edit-large-text.

  5. #5

    Thread Starter
    MS SQL Powerposter szlamany's Avatar
    Join Date
    Mar 2004
    Location
    Connecticut
    Posts
    18,263

    Re: Why does it look like this???

    Thanks - that was exactly it - the CSS is now

    Code:
    .acs-edit-large-block-text
    {   display: block;
        width: 210px;
        margin: 3px;
    }
    
    .acs-edit-xlarge-block-text
    {   display: block;
        width: 280px;
        margin: 3px;
    }
    and the screen looks like...
    Attached Images Attached Images  

    *** Read the sticky in the DB forum about how to get your question answered quickly!! ***

    Please remember to rate posts! Rate any post you find helpful - even in old threads! Use the link to the left - "Rate this Post".

    Some Informative Links:
    [ SQL Rules to Live By ] [ Reserved SQL keywords ] [ When to use INDEX HINTS! ] [ Passing Multi-item Parameters to STORED PROCEDURES ]
    [ Solution to non-domain Windows Authentication ] [ Crazy things we do to shrink log files ] [ SQL 2005 Features ] [ Loading Pictures from DB ]

    MS MVP 2006, 2007, 2008

Posting Permissions

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



Click Here to Expand Forum to Full Width