473,396 Members | 1,760 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

CSS effect question.

I'm looking to achieve a particular effect using CSS. This is a rough sketch of it:



Does anyone know the code required for this?
Jun 4 '07 #1
4 1351
drhowarddrfine
7,435 Expert 4TB
Semantically, we shouldn't do it this way but it validates and works.
[html]
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title></title>
</head>
<body>
<fieldset>
<legend><span style="border:1px solid">Text</span></legend>
<p>More text</p>
</fieldset>
</body>
</html>
[/html]

<fieldset> is actually supposed to be inside a <form> and even a <p> so I'm surprised it validated.

I've seen this somewhere before but never did it myself. I would have done it differently but don't have time tonight.
Jun 4 '07 #2
Thank you. Any other ideas? Is there any way to control how far from the left the <legend> box is?
Jun 4 '07 #3
vkfmj
3
Thank you. Any other ideas? Is there any way to control how far from the left the <legend> box is?
Yes, you can use the margin attribute: (from O'REILLY'S CSS ref)

margin-bottom: marginThickness | auto
margin-left: marginThickness | auto
margin-right: marginThickness | auto
margin-top: marginThickness | auto

default is 0

Example:
blockquote {margin-left: 20; margin-top: 10}
#narrowCol {margin-left: 30%; margin-right: 30%}
Jun 4 '07 #4
Thank you all for the answers. I got it to work just fine. I've got a related question, now though. How would this be implemented?



Or basically, positioning the legend box anywhere along the border.
Jun 9 '07 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

7
by: Gary Duncan | last post by:
Hi all, My first incursion into this group so apologies if the following question is misplaced. That is, I'm trying to find some free javascript which implements the "ken burns effect" on...
3
by: Tal Shachar | last post by:
Hi All, I posted this request on ...dotnet.framework.interop newsgroup, but I thought to try also here, and ask to get your inputs for the following issue: I have an application written in C++,...
4
by: George | last post by:
Got a question about the side effect of DataAdapter.Update() and DataTable.GetChanges(). Say I set up a DataTable and a DataAdapter in a class. Delete (Not remove) a row in the data table and...
16
by: eholz1 | last post by:
Hello CSS group, I saw a beautiful effect that I would like to use either by CSS or using photoshop to create the image/effect (maybe even imagemagick) the site address is:...
3
by: Gandalf | last post by:
Sharp effect is one of the photoshop effect on letters. some one a javascript script that create the same effect? thanks
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.