SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Hybrid View

  1. #1
    He's No Good To Me Dead silver trophybronze trophy stymiee's Avatar
    Join Date
    Feb 2003
    Location
    Slave I
    Posts
    23,423
    Mentioned
    2 Post(s)
    Tagged
    1 Thread(s)

    CSS width: and the <legend> tag

    I tried to use width: in my CSS to affect the width of my legend tag as I was hoping to have them all be the same size. Didn't seem to work. Is it because I'm going about it the wrong way? Or is it just not possible? For a visual go to http://dev.johnconde.net/DOM/dom4.php (You'll need a Gecko-based browser to see this). My goal is to have the headers of the fieldsets (the legend tags) be uniform on that page.

  2. #2
    The CSS Clinic is open silver trophybronze trophy
    Paul O'B's Avatar
    Join Date
    Jan 2003
    Location
    Hampshire UK
    Posts
    40,374
    Mentioned
    180 Post(s)
    Tagged
    6 Thread(s)
    Hi,

    I think the only way to do it is to float them and they they seem to accept widths in mozilla.
    Code:
    legend {
    	background-color: #3333CC;
    	padding: 0.2em 0.5em;
    	border: 1px solid #3333CC;
    	color: #fffccf; float:left;
    	font-size: 90%;width:200px;
    margin-top:-17px;
    }
    Of course it adjust the positioning a bit.

    Paul

  3. #3
    He's No Good To Me Dead silver trophybronze trophy stymiee's Avatar
    Join Date
    Feb 2003
    Location
    Slave I
    Posts
    23,423
    Mentioned
    2 Post(s)
    Tagged
    1 Thread(s)
    I'm not sure if my CSS skills are strong enough to make that work. But then again, that's why we learn. I'll play around with that and see if I can make something of it. Thanks for the help.


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
  •