Replies

Jul 19, 2009 16 years ago
DAMIAN_411
gets around
User Avatar

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

Jul 19, 2009 16 years ago
Scarsdale
User Avatar

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'> ;)

Jul 19, 2009 16 years ago
Sammii
is a sun worshipper
User Avatar

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.

Jul 19, 2009 16 years ago
DAMIAN_411
gets around
User Avatar

Thanks and . Got it working now. :) And yeah, I fixed the errors. Didn't notice that square bracket. xD

Please log in to reply to this topic.