View Full Version : Setting the CSS border length?
Sluger
October 6th, 2004, 09:56 PM
Im brand new to CSS and im starting to learn it, i making a table, and this is what i have so far :
style type="text/css">
h3 {text-indent: .1cm}
h3 {font-family: Verdana}
h3 {color: #666666}
h3 {font-size: 90%}
h3
{
border: 2px dashed #cccccc
}
I need to the lenght of the border now....
Thank You
ContinuumXLS
October 6th, 2004, 11:22 PM
I need to the lenght of the border now....
Could you be more specific? Do you mean height? :h:
Sluger
October 6th, 2004, 11:47 PM
No, i mean the length of the whole table....
lostinbeta
October 7th, 2004, 12:14 AM
You can't do it just for the border. You need to define the width: and/or height: attribute in the CSS for the h3, and the border will adapt around that. BTW... never use multiple tags for the same element, combine them in one (this includes example of adding width and height to it...
<style type="text/css">
h3 {
width: 400px;
height: 100px;
text-indent: .1cm;
font-family: Verdana;
color: #666666;
font-size: 90%;
border: 2px dashed #cccccc;
}
</style>
Though i'm a bit rusty on CSS... perhaps I am wrong and h3 tags don't support width and height (like those retched span tags!... you gotta love em, but they lack support for a lot of CSS features)
Sluger
October 7th, 2004, 04:12 PM
Ok, thank you. :)
[m]
October 7th, 2004, 11:10 PM
You can't do it just for the border. You need to define the width: and/or height: attribute in the CSS for the h3, and the border will adapt around that. BTW... never use multiple tags for the same element, combine them in one (this includes example of adding width and height to it...
<style type="text/css">
h3 {
width: 400px;
height: 100px;
text-indent: .1cm;
font-family: Verdana;
color: #666666;
font-size: 90%;
border: 2px dashed #cccccc;
}
</style>
Though i'm a bit rusty on CSS... perhaps I am wrong and h3 tags don't support width and height (like those retched span tags!... you gotta love em, but they lack support for a lot of CSS features)
Haha, never thought about using a display:block; on those span elements, have you? :P
You can only set heights and widths to elements that aro of the type 'block'. Most elements are that default, but some (like strong and span) are inline.
lostinbeta
October 8th, 2004, 12:29 AM
Like I said... i'm rusty on my CSS... and now i'm rusty on my CSS and very appreciative of the new info! :beam:
Powered by vBulletin® Version 4.1.10 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.