SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Enthusiast
    Join Date
    May 2005
    Posts
    54
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question achieve fieldset format with divs

    Hi,

    What is the alternative to fieldset and legend when attempting to format plain content (not a form).

    I've been playing around with divs but haven't been able to f ind the right combination to achieve the same look as <fieldset> (ie. Want the heading to float over the div border).

    Any help is much appreciated.

  2. #2
    SitePoint Enthusiast
    Join Date
    May 2005
    Posts
    54
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    This seems to work in ie6, opera9 and firefox but css I'm using looks dreafully messy even to a noob like myself.

    Is there a more correct way I should be writing this?

    Code HTML4Strict:
     
    <div style="width: 100%;">
     
        <h2 style="width: 100px;margin:0;margin-left: 5px;padding:0;position:relative;top: 10px;background-color: white;z-index: 10;text-align: center;">Heading</h2>
     
        <div style="width: 100%;border: 1px solid #FC0;padding: 1em;position:relative;">       
            <p>content text content text content text </p>
            <p>content text content text content text </p>
            <p>content text content text content text </p>
        </div>
     
    </div>


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
  •