Solid Block Of Colour
- luke-stealth-man
-
luke-stealth-man
- Member since: Jul. 8, 2005
- Offline.
-
- Forum Stats
- Member
- Level 05
- Blank Slate
Say i want to make a solid block of a certain colour and put some text in it.
I could use an image, but id rather use HTML or something.
I dont want to use a full table or anything as complicated as that... Just a simple line of code or something if possible.
Ive atached a picture showing what i mean ^^
- elbekko
-
elbekko
- Member since: Jul. 23, 2004
- Offline.
-
- Forum Stats
- Member
- Level 16
- Blank Slate
<span style="height: 35px; width: 200px; background-color: #FF0000">Text goes here</span>
That should do it. Change the dimensions and colour to whatever you want ;)
"My software never has bugs. It just develops random features. " - Unknown
[ FluxBB developer | Quickmarks 0.5.1 | Strings & Ints - my blog ]
- Jcrypt
-
Jcrypt
- Member since: Aug. 23, 2005
- Offline.
-
- Forum Stats
- Member
- Level 11
- Blank Slate
use a div layer... Example:
<div id="main" style="background-color: #FF0000; z-index: 2; position: absolute; left: 300 px; top: 50px"> My text here!!!!!!!!!!!!!</div>
- DoomyCheese
-
DoomyCheese
- Member since: Aug. 25, 2006
- Offline.
-
- Forum Stats
- Member
- Level 09
- Blank Slate
I just use dreamweaver or Microsoft Frontpage, I set it up how I want it, then go across to the code for it, then cut and paste it. :P
- Jessii
-
Jessii
- Member since: Feb. 10, 2005
- Offline.
-
- Forum Stats
- Member
- Level 36
- Movie Buff
At 11/6/06 02:03 AM, DoomyCheese wrote: I just use dreamweaver or Microsoft Frontpage, I set it up how I want it, then go across to the code for it, then cut and paste it. :P
And how does this help this guy's particular problem?
I say that if you know how to use tables, you can use a table cell, put the text in the table and then change the background color:
<div id="main" style="background-color: #FF0000; z-index: 2; position: absolute; left: 300 px; top: 50px"> My text here!!!!!!!!!!!!!</div>
That's the OLD way of doing it. Now everything should be done in css, it makes it a lot easier to change the style of the div but since he asked for HTML this would work.
But if you were to use css, it would look like this:
#main {z-index: 1;
position: absolute;
background-color: #FF0000;
left: 300px;
top: 0px; }
To learn more about it, go to http://www.w3schools.com
- elbekko
-
elbekko
- Member since: Jul. 23, 2004
- Offline.
-
- Forum Stats
- Member
- Level 16
- Blank Slate
At 11/6/06 08:46 AM, Jessii wrote:<div id="main" style="background-color: #FF0000; z-index: 2; position: absolute; left: 300 px; top: 50px"> My text here!!!!!!!!!!!!!</div>That's the OLD way of doing it. Now everything should be done in css, it makes it a lot easier to change the style of the div but since he asked for HTML this would work.
Err... everything in the style attribute is CSS :P It's inline styling and recommended by W3C for this stuff.
"My software never has bugs. It just develops random features. " - Unknown
[ FluxBB developer | Quickmarks 0.5.1 | Strings & Ints - my blog ]
- wolfinator-x
-
wolfinator-x
- Member since: Jul. 17, 2006
- Offline.
-
- Forum Stats
- Member
- Level 13
- Musician
I would help you... if I knew what you mean...
- Zendra
-
Zendra
- Member since: Sep. 7, 2003
- Offline.
-
- Send Private Message
- Browse All Posts (13,663)
- Block
-
- Forum Stats
- Member
- Level 51
- Blank Slate
At 11/6/06 10:08 AM, wolfinator-x wrote: I would help you... if I knew what you mean...
How about you first check the previous posted replies and than see if you still need to help.
- smulse
-
smulse
- Member since: Mar. 24, 2005
- Offline.
-
- Forum Stats
- Member
- Level 31
- Blank Slate
As above or you could use a prargraph background colour for the text using CSS rather than span.


