Developers Archive for the 'Html tags and issues' Category

Converting HTML Colour to RGB

Converting HTML Colour to RGB Wednesday, February 21st, 2007

Lets say we have a webbrowser and we want to convert the background colour to RGB and VB, here’s how to do it! (webbrowser1.document.bgcolor will return “#aaffff” or similar)
a = Webbrowser1.document.bgColor
R = Val("&H" + Mid$(a$, 2, 2)) ' Value 170
G = Val("&H" + Mid$(a$, 4, 2)) ' Value 255
B = Val("&H" + Mid$(a$, 6, 2)) ' Value 255

result = rgb(R,G,B)

' result is a vb color value (LONG) = 16777130

How to change the scroll bar color with css

How to change the scroll bar color with css Monday, February 19th, 2007

To change the scroll bar color with css following attributes are used
<style>
SCROLLBAR-FACE-COLOR: buttonface;
SCROLLBAR-HIGHLIGHT-COLOR: white;
SCROLLBAR-SHADOW-COLOR: buttonface;
SCROLLBAR-3DLIGHT-COLOR: buttonface;
SCROLLBAR-ARROW-COLOR: buttonshadow;
SCROLLBAR-TRACK-COLOR: silver;
SCROLLBAR-DARKSHADOW-COLOR: buttonshadow;
SCROLLBAR-BASE-COLOR: buttonface;
</style>

Advanced Custom Page Colors

Advanced Custom Page Colors Thursday, February 15th, 2007

Allows user to set the background color and text color, you can set a message if they choose certain colors.

<body bgcolor=<?=$_GET[”bg”]?> text=<?=$_GET[”txt”]?>>
<center>
<form method=”GET”>
<input type=”text” value=”Background Color” name=”bg”>
<input type=”text” value=”Text Color” name=”txt”>
<input type=”hidden” value=1 name=done>
<input type=”submit” value=”Change”>
<input type=”reset” value=reset>
</form>
<?
if (isset($_GET[”done”])) {
if ($_GET[”bg”]==”YOUR SPECIFIC BACKGROUND COLOR”) {
if ($_GET[”txt”]==”YOUR SPECIFIC TEXT COLOR”) {
echo “YOUR TEXT IF COLORS ARE USED”; }
else {
echo “You are using $_GET[bg] for your background color and $_GET[txt] for your text color”; }
}
else {
echo “You are using $_GET[bg] for your background color and $_GET[txt] for your text color”; }
}
else {
echo “<font color=white>Choose something</font>”;
}
?>


All material @ copyrighted by chrisranjana.com. If you want to link to this article you are welcome to do so. Unauthorized publication is strictly prohibited. This developer tutorial website contains articles by Php programmers , Software developers, Mysql programmers and asp c# programmers. This website also contains ajax tutorials and advanced mysql sql stored procedures and functions tutorials and sample codes.