Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

please help with styles 2

Status
Not open for further replies.

sql99

Programmer
Nov 12, 2003
83
US
Hello,

I have the following in my <head> section:

<STYLE TYPE="text/css">
<!--
H1
{
color:#ffdd38;
font-size:16;
font-style:italic;
}
H2
{
color:#ffffff;
font-size:16;
font-style:italic;
}
-->
</STYLE

and I have the following in my table section:

<TABLE BORDER=0>

<TR><TH ALIGN=RIGHT><H1>*</H1><H2>Name:</H2><TD><input type="text" size="25" name="empname"><br>


However when it's displayed on the page, it has the asterisk on one line and Name: on the following line. Do you know why they aren't together?

Thanks in advance,
sql99
 
Not sure if it is the problem, but your <TH> tag is never closed.

--Chessbot

"See the TURTLE of enormous girth!"
-- Stephen King, The Dark Tower series
 
Yes. H1 tags, by default, are block tags.

Here is my suggested solution:

Code:
<style type="text/css">
<!--
.classOne {
   color:#ffdd38;
   font-size:16;
   font-style:italic;
   }
.classTwo {
   color:#ffffff;
   font-size:16;
   font-style:italic;
   }
-->
</style>

</head>

<body>
<span class="classOne">*</span><span class="classTwo">Name:</span><input type="text" size="25" name="empname"><br>
</body>

You're missing a closing </td> tag in there. If you want to keep your code as-is, do something like this:

Code:
<STYLE TYPE="text/css">
<!--
H1
   {
   color:#ffdd38;
   font-size:16;
   font-style:italic;
   [red]display: inline;[/red]
   }
H2
   {
   color:#ffffff;
   font-size:16;
   font-style:italic;
   [red]display: inline;[/red]
   }
-->
</STYLE        

and I have the following in my table section:

<TABLE BORDER=0><TR>
<TH ALIGN=RIGHT><H1>*</H1><H2>Name:</H2></th><TD><input type="text" size="25" name="empname"><br>

*cLFlaVA
----------------------------
Lois: "Peter, you're drunk!"
Peter: "I'm not drunk, I'm just exhausted from stayin' up all night drinking!
 
Hi Chessbot, thanks for the quick response. Previously I didn't close the <TH> tag and everything worked fine with <FONT ....>. Now that I changed it to style, it doesn't work the way it should...
 
sql99 -

do yourself a HUGE favor and don't do ANY design testing in Internet Explorer. It is never ok to not close tags.

:)

*cLFlaVA
----------------------------
Lois: "Peter, you're drunk!"
Peter: "I'm not drunk, I'm just exhausted from stayin' up all night drinking!
 
Thanks again chessbot and CLFlaVA. I really appreciate your help....
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top