Can layers have borders?

liunx

Guest
Hi, another day, another question, another request off you guys: can layers have borders? If so, could you pls tell me the syntax, such as width and color properties?<br />
<br />
As usual, thanks! <br />
:O)<br />
Cheers.<!--content-->Well, I'll skip my traditional 'don't call them layers!' lecture and cut to the chase: sure you can. CSS:<br />
<br />
border:size color style;<br />
<br />
E.g.: #menuLayer {border:4px gold groove;}<br />
<br />
This is a shorthand for the three border properties:<br />
border-width border-color border-style. You can also apply border styles to each of the four borders separately.<br />
<br />
One disturbing thing: NS4 wraps the layer's contents (not the layer) in the border - heightwise - so hacks are often necessary to 'pad out' the content area. Be advised.<br />
<br />
<!-- m --><a class="postlink" href="http://www.htmlhelp.com/reference/css/box/border.html">http://www.htmlhelp.com/reference/css/box/border.html</a><!-- m --><!--content-->Hey mrkite,<br />
<br />
I'm not able to get it right with this code, can you give me a sample page/site where I can see a similar effect?<br />
<br />
Thanks,<br />
Cheers.<!--content-->The above CSS style is correct. <br />
Are you calling the id within your <div> tag?<br />
E.g.<br />
<br />
<div id="menuLayer"><br />
<br />
You will need to do this to bring the style into play.<!--content-->Hi, here is how the code I'm creating (DWeaver) looks:<br />
<br />
<body bgcolor="#FFFFFF"><br />
<br />
<div id="Layer1" style="position:absolute; width:200px; height:115px; z-index:1; border:4px"></div><br />
<br />
</body><br />
<br />
This is a blank page with only the layer in it. But there is no effect of the css in here. What am I doing wrong? :supereek:<br />
<br />
Thanks,<br />
Cheers!<!--content-->You need the sytle of the border to make the border visible.<br />
so...<br />
<br />
...style="border: 4px solid"...<br />
<br />
PS<br />
What's Layers?<br />
Never heard of Layers in HTML before :rolleyes:<!--content-->border is a CSS 'shortcut' attribute - it replaces border-width, border-color and border-style. Some browsers aren't fussy when it comes to the order (or completeness) of these composite attributes, and some - no names here - are. Best to develop the habit:<br />
<br />
font: 600 14px Helvetica,Verdana,sans-serif;<br />
border: 4px silver solid;<!--content-->... to all of you. Alka, believe me, am trying to get a hold of mrkite's article on what "layers" really are (am really about anxious now!).........<!--content-->http://www.westciv.com/style_master/academy/css_tutorial/properties/page_layout.html<!--content-->Thanks! :)<!--content-->
 
Back
Top