Forum Moderators: not2easy
Can CSS get rid of this line break?
~Shane
______________________________________
<hr color="#FFFFFF"><br>
<a name="Weather"></a>
<table width="24%" border="0" align="center" cellpadding="10" cellspacing="2">
<tr align="center" valign="top">
<td nowrap><div align="center">
<script language=javascript>var city = 'Nanaimo_BC';</script>
<script language=javascript src='http://www.theweathernetwork.com/weatherbutton/test.js'></script></div></td>
<td nowrap><div align="center">
<script language=JavaScript src='http://www.theweathernetwork.com/weatherbutton/search/150X90.js'></script>
</div></td>
</tr>
</table>
<hr>
__________________________________________
I believe that would put the hr right at the bottom of the table. So, you may want to change the table to...
table{margin-bottom:.5em;}
You could also approach this another way and do something like this...
table{border-top:.1em solid #000;border-bottom:.1em solid #000;}
...and skip the whole <hr> thing.
Just experiment with the margin attributes on those two elements and you should be able to come up with a suitable arrangement to meet your requirements.
?Where in the CSS feature of Dreamweaver can I define these values you gave me?
""table{margin-bottom:0;}""
""hr{margin-top:0;}""
I cannot find a box for margins. Basically I am not sure how to create a CSS definition like the one above.
?Also, do I place the cursor after the table in the HTML view and paste in the CSS once I know how to make this CSS definition?
~Shane
[edited by: alcheme at 8:04 pm (utc) on Aug. 20, 2003]
<head>
<title>
<other metadata/head elements>
<style type="text/css">
table{margin-bottom:0;}
hr{margin-top:0;}
</style>
</head>
I have never seen this happen - sorry.
Well I did say sometimes :D
I'm not sure what, if any, rules IE follows for this, but I have found in the past it can fix weird errors such as extra margins or line spaces appearing where they shouldn't. And I've found that if you don't know it's a possiblity then you can spend days looking for the problem, when it's actually easily fixed. And it only takes a second to test, so I figured it was worth a mention :)
The problem here, for me anyway ;), is that the code that is being written/generated by the Javascript is causing the problem
the "line feed" is inside the table (try putting colored borders on the table, you'll see there are nested tables being generated) but on reading the .js file there is also a <form> in there and it's this that's causing the "gap"
try adding this:
td form{
margin: 0;
padding: 0;
}
into the CSS as described by P1R in post #11.. then any remaing gaps are probably being caused by cellpadding and cellspacing on your table
Suzy