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 5 of 5
  1. #1
    Regular Coder
    Join Date
    Dec 2008
    Posts
    120
    Thanks
    15
    Thanked 2 Times in 2 Posts

    Multiline Indent.

    Hi,

    I have the following long text link:

    Code:
    <a href="#">This is a long link blah blah</a>
    Here is the CSS:
    Code:
    a {
       margin-left: 4px;
    }
    The problem is the box is not wide enough to cover the whole link, thus its dropping to the next line. Like this:

    Code:
        This is a long link 
    blah blah
    I really need it to look like:

    Code:
        This is a long link 
        blah blah
    Many Thanks!

  • #2
    Senior Coder alykins's Avatar
    Join Date
    Apr 2011
    Posts
    1,930
    Thanks
    46
    Thanked 203 Times in 202 Posts
    put it inside a block element like a <p> (my option)

    I code C hash-tag .Net
    Reference: W3C W3CWiki .Net Lib
    Validate: html CSS
    Debug: Chrome FireFox IE

  • #3
    Regular Coder
    Join Date
    Dec 2008
    Posts
    120
    Thanks
    15
    Thanked 2 Times in 2 Posts
    It's already in <a> tag.

  • #4
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,866
    Thanks
    160
    Thanked 2,224 Times in 2,211 Posts
    Code:
    .my_p{
    padding-left:4px;
    }
    Code:
    <p class="my_p">This is a long link blah blah</p>
    It's already in <a> tag.
    Then, set display:block; to it.

    PS: Do you know the difference between inline and block level elements?
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)

  • #5
    Senior Coder alykins's Avatar
    Join Date
    Apr 2011
    Posts
    1,930
    Thanks
    46
    Thanked 203 Times in 202 Posts
    Quote Originally Posted by alykins View Post
    put it inside a block element like a <p> (my option)
    block element... the <a> tag is inline

    I code C hash-tag .Net
    Reference: W3C W3CWiki .Net Lib
    Validate: html CSS
    Debug: Chrome FireFox IE


  •  

    Posting Permissions

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