Hey all. I'm trying to create a simple box around my text in which I can change the background color of the box, the border color/thickness and the height/width of the box.
This is what I have so far:
<style>BODY, P, TABLE, TD, P TABLE {BODY [background:white HR {height:100;color:black;width:100px;} , , , , , .TT, .HDR{display:none;} TABLE, TD, P {text-align:center;} {border: 1px solid green}</style>
But it isn't working. xD Any help is greatly appreciated.
Thanks! :D
Try:
<div style='background-color:white; border:solid 1px green; height:100px; width:100px;'>
Above is a simple DIV box. What it looks like you are doing is trying to format a page through CSS. In that case, change <style> to <style type='text/css'> ;)
What posted should work for you, but it might be easier to put all of the style information in an id instead of in the HTML, like so: (remove the asterisk)
<style>
{
height: 100px;
width: 100px;
background-color: ;
border: 2px solid ;
padding: 10px; /adds space between the content and the border/
}
</style>
<div id="box"> All your text lalalalalalaalala. <*/div>
Also, the code you posted has a few errors in it that you might want to look over. :X For one, there are no square brackets in CSS, lol.