Free Web Hosting Forum
Go Back   Free Web Hosting Forum > Website Building > Web Design and HTML
Reload this Page Search Form change the font color
Reply
 
Thread Tools Display Modes
(#1 (permalink))
Old
Member
Isengard is on a distinguished road
 
Posts: 32
Join Date: Jun 2012
Default Search Form change the font color - 07-12-2012, 05:29 AM

Hello,

I was wondering if someone could help me changing the font color in the search form in the template. I know how to do some coding but very little. But I think I found the coding for the search field and I attempted to see if I could do it myself but I guess it didn't work. I will just give the whole code that I have just in case I was wrong.

Thank you in advanced

<head>

<meta http-equiv="content-type" content="{%MetaCharset%}" />
<meta name="description" content="{%MetaDescription%}" />
<meta name="keywords" content="{%MetaKeywords%}" />
<title>{%MetaTitle%}</title>

<link href="images/default.css" rel="stylesheet" type="text/css" media="screen" />
</head>
<body>
<!-- start header -->
<div id="wrapper">
<div id="header">
<div id="logo">
<h1><a href="index.php">{%WebsiteName%}</a></h1>
<p>{%WebsiteSlogan%}</p>
</div>
<div id="rss">&nbsp;</div>
<div id="search"><form id="searchform" method="get"> <fieldset> <input name="search" id="s" size="15" value="Search" type="text" /> </fieldset> </form></div>
</div>

[I thought this was the code that I needed to put the color in]

<!-- end header --> <!-- star menu -->
<div id="menu">
<ul>
<!--{%menu_start=1%}-->
<li><a href="{%menu_href%}">{%menu_display%}</a></li>
<!--{%menu_end=1%}-->
</ul>
</div>
<!-- end menu --> <!-- start page -->
<div id="page"><!-- start ads --> <!-- end ads --> <!-- start content -->
<div id="content">
<div class="post">
<div class="title">
<h2>{%name%}</h2>
</div>
<div class="entry">{%content%}
<p>&nbsp;</p>
</div>
</div>
</div>
<!-- end content --> <!-- start sidebar -->
<div id="sidebar">
<ul>
<li id="categories">
<h2 style="text-align: center;">{%gallery_Car_Detailing%}</h2>
</li>
</ul>
</div>
<!-- end sidebar --></div>
<!-- end page --> <!-- start footer -->
<div id="footer">
<p class="legal">{%WebsiteFooter%}</p>
</div>
</div>
<!-- end footer -->
</body>
</html>
Reply With Quote
Sponsored Links
(#2 (permalink))
Old
Junior Member
tempz is on a distinguished road
 
Posts: 17
Join Date: Jul 2012
Default 07-12-2012, 07:14 AM

It's pretty simple stuff - here

Code:
#search value {
color:#colorhex;
}
Reply With Quote
(#3 (permalink))
Old
Member
Isengard is on a distinguished road
 
Posts: 32
Join Date: Jun 2012
Default 07-12-2012, 07:16 AM

So I just add it where the red text is then?
Reply With Quote
(#4 (permalink))
Old
Junior Member
tempz is on a distinguished road
 
Posts: 17
Join Date: Jul 2012
Default 07-12-2012, 07:23 AM

Quote:
Originally Posted by Isengard View Post
So I just add it where the red text is then?

Yes if you want the text to be red you will add:

Code:
#search value {
color:red;
}
Reply With Quote
(#5 (permalink))
Old
Member
Isengard is on a distinguished road
 
Posts: 32
Join Date: Jun 2012
Default 07-12-2012, 07:25 AM

but I add it in this coding

<div id="search"><form id="searchform" method="get"> <fieldset> <input name="search" id="s" size="15" value="Search" type="text" /> </fieldset> </form></div>
</div>

?
Reply With Quote
(#6 (permalink))
Old
Junior Member
tempz is on a distinguished road
 
Posts: 17
Join Date: Jul 2012
Default 07-12-2012, 07:30 AM

Quote:
Originally Posted by Isengard View Post
but I add it in this coding

<div id="search"><form id="searchform" method="get"> <fieldset> <input name="search" id="s" size="15" value="Search" type="text" /> </fieldset> </form></div>
</div>

?

No you will add it to your style-sheet under the element #search

Here are the changes will you make to #search

You will add value to the end of search with a space between them!

Then you will add the following code to the #search

Code:
color:red;
What this is doing it's calling the search element then looking for the value tag in your form on your website and changing the color!
Reply With Quote
(#7 (permalink))
Old
Member
Isengard is on a distinguished road
 
Posts: 32
Join Date: Jun 2012
Default 07-12-2012, 07:41 AM

No matter where I put it

it comes up

#search value {
color:red;
}

I am using the html format. I am sorry I am not that experience with coding. But I do appreciate your help
Reply With Quote
(#8 (permalink))
Old
Junior Member
tempz is on a distinguished road
 
Posts: 17
Join Date: Jul 2012
Default 07-12-2012, 08:20 AM

Quote:
Originally Posted by Isengard View Post
No matter where I put it

it comes up

#search value {
color:red;
}

I am using the html format. I am sorry I am not that experience with coding. But I do appreciate your help
Where are you putting

Code:
#search value {
color:red;
}
Reply With Quote
(#9 (permalink))
Old
Member
Isengard is on a distinguished road
 
Posts: 32
Join Date: Jun 2012
Default 07-12-2012, 08:54 AM

I put it before

<div id="search"><form id="searchform" method="get"> <fieldset> <input name="search" id="s" size="15" value="Search" type="text" /> </fieldset> </form></div>

and after it and even in-between it

I also but it at the end
Reply With Quote
(#10 (permalink))
Old
Junior Member
tempz is on a distinguished road
 
Posts: 17
Join Date: Jul 2012
Default 07-12-2012, 09:29 AM

This is what you should have in the end!!



Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled 1</title>
<style type="text/css">
#mystyle input {
	color:red;

}
</style>
</head>

<body>
<div id="mystyle"><form id="searchform" method="get"> <fieldset> <input name="search" id="s" size="15" value="Search" type="text" /> </fieldset> </form></div>
</body>

</html>

Sorry I made it mistake you need to call "input"
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.5.2
vBulletin Skin developed by: vBStyles.com