|
-
Mar 8th, 2003, 12:54 PM
#1
Thread Starter
Addicted Member
CSS table error
I'm not really a fan of CSS, actually, I've never used it, so I'm not sure if this is a common problem.
I have the following code:
<style>
H1 {
font-family : Arial;
color : #FFFFFF;
text-align : left;
font-weight : bold;
font-size : 12px;
}
</style>
I am using it as a title in a table, like this:
--------------
|Title...........|
--------------
|..................|
|..................|
|-------------|
The problem is that, when I use this code (<h1>Title</h1)), the header part of my table seems to come down, as if a new paragraph had been added, so it ends up like:
--------------
|Title............|
|..................|
--------------
|..................|
|..................|
|-------------|
as if there were 2 rows.
Any help is appreciated. Thanks
BTW: the "......." represent open space, I had to use it so it would display right on this forum.
-
Mar 8th, 2003, 04:31 PM
#2
Fanatic Member
Maybe it has something to do with your font. Try changing the bold and size (headers wont change anyways as far as I know).
-
Mar 8th, 2003, 05:08 PM
#3
Thread Starter
Addicted Member
Do you think I need to add some configuration in the "P" tag?
-
Mar 8th, 2003, 05:32 PM
#4
Member
Can we see the code for your page? It's quite possible there is some unintentional white space that gets moved to the next line when the font size is increased or bolded.
I'm not really a fan of CSS, actually, I've never used it
Once you really learn it and use it fully, you'll never want to go back. CSS is one of the best things that has happened to the Web.
-
Mar 8th, 2003, 05:44 PM
#5
Thread Starter
Addicted Member
This is the code I have:
Code:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Agenda Universal</title>
<style>
P {
font-size : 13px;
font-family : Arial;
color : #000000;
text-align : left;
margin : 0;
}
TABLE {
font-family : Arial;
color : #000000;
text-align : left;
font-size : 13px;
}
H1 {
font-family : Arial;
color : #FFFFFF;
text-align : left;
font-weight : bold;
font-size : 13px;
}
BODY {
font-size : 13px;
font-family : Arial;
color : #000000;
}
A:hover {
font-weight : normal;
font-size : 13px;
font-family : Arial;
color : #000000;
background : #000000transparent;
text-decoration : none;
}
</style>
</head>
<body bgcolor="#666666">
<table border="1" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber4">
<tr>
<td width="100%" bgcolor="#8AB7DD">
<h1>Bienvenidos</h1></td>
</tr>
</table>
</body>
</html>
-
Mar 8th, 2003, 08:31 PM
#6
Member
Addto your H1 style definition.
-
Mar 8th, 2003, 08:36 PM
#7
Thread Starter
Addicted Member
It works perfectly now.
Thanks everyone.
-
Mar 9th, 2003, 01:59 PM
#8
Frenzied Member
By the way you need type="text/css" in with that <style> tag.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|