SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Wizard DoubleDee's Avatar
    Join Date
    Aug 2010
    Location
    Arizona
    Posts
    3,777
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)

    Legend inside Fieldset

    Is it possible to position the Legend *inside* the Fieldset so that the fieldset box is continuous (i.e. not broken) and the Legend text sits inside that box in the upper left-hand corner?

    Before I did this using a <p>, but semantically I think it is better to use <legend>. However I still want the same appearance described above...

    Hope that makes sense?!

    Sincerely,


    Debbie

  2. #2
    SitePoint Mentor bronze trophy
    John_Betong's Avatar
    Join Date
    Aug 2005
    Location
    City of Angels
    Posts
    1,840
    Mentioned
    73 Post(s)
    Tagged
    6 Thread(s)
    Try this:

    Code:
    <style type="text/css">
    fieldset {background-color:#9f9;}
    legend {background-color:#cff; float:left; font-size:1.2em; margin: -2em  1em 0 0; padding:0;}
    </style>
    Last edited by John_Betong; Jun 21, 2014 at 20:42. Reason: adjusted margin:
    Learn how to be ready for The New Move to Discourse

    How to make Make Money Now with a *NEW* look

    Be sure to congratulate Patche on earning Member of the Month for July 2014

  3. #3
    SitePoint Wizard DoubleDee's Avatar
    Join Date
    Aug 2010
    Location
    Arizona
    Posts
    3,777
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by John_Betong View Post
    Try this:

    Code:
    <style type="text/css">
    fieldset {background-color:#9f9;}
    legend {background-color:#cff; float:left; font-size:1.2em; margin: -2em  1em 0 0; padding:0;}
    </style>
    Yep, that did it! (Makes total sense, too!)

    Thanks!


    Debbie


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
  •