1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

html button text css

Discussion in 'HTML & Website Design' started by Cinta April, Apr 25, 2008.

  1. #1
    hi how do I make the value of a button with long words go into a newline instead of stretching one long line in html?

    eg i am a very long button

    to

    i am a
    very long
    button
     
    Cinta April, Apr 25, 2008 IP
  2. itcn

    itcn Well-Known Member

    Messages:
    795
    Likes Received:
    31
    Best Answers:
    0
    Trophy Points:
    118
    #2
    itcn, Apr 26, 2008 IP
  3. Icj001

    Icj001 Peon

    Messages:
    28
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Excuse my ignorance but, what difference does it make?
     
    Icj001, Apr 26, 2008 IP
  4. _burner_

    _burner_ Peon

    Messages:
    11
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    did you try with
    i am a
    very long
    button

    <button type="submit">i am at<br>very long<br>button</button>
     
    _burner_, Apr 26, 2008 IP
  5. Cinta April

    Cinta April Banned

    Messages:
    262
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #5
    it works burner. thanks
     
    Cinta April, Apr 26, 2008 IP
  6. DPian

    DPian Well-Known Member

    Messages:
    1,352
    Likes Received:
    53
    Best Answers:
    0
    Trophy Points:
    195
    #6
    no, its incorrect.
    If you want a text to break lines automatically, use this css style:

    <style type="text/css">
    #text {
    width: 200px;
    }
    </style>

    <p id="text>This is a long text which will be broken after it reaches 200 pixels of width</p>
    Or you can use <div id="text">blah blah</div>
     
    DPian, Apr 26, 2008 IP
  7. Cinta April

    Cinta April Banned

    Messages:
    262
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #7
    ok even though it works i need to get the value of the button and when i test it the value ignores the <br/> tag.
     
    Cinta April, Apr 26, 2008 IP