Hi all,
I am a very amateur web designer, self taught, and I build/run my site in notepad! As such, I try and keep things extremely simple, all I want is a good looking site that does what it needs to, and runs well in all browsers with the minimum of fuss.
I have spent a few weeks struggling through various issues, and usually fixing any problems that I come across through the use of google. However, this latest one has me at my wits end after hours of tinkering and searching.
I have a page, with a load of content (just text, basically) inside a <td> element. This was all fine, until I decided that within this element I wanted a 'text box', of 25% width, floating on the right hand side - a 'latest news' box. I added this through use of a <div> class.
Code:
<table border="5" width="100%" cellpadding="20">
<tr>
<td width="100%" valign="top">
<div class="news_box">
<h3 style="color: #00007A">Latest News</h>
<ul>
<li><p style="color: #00007A">Text</p></li>
<li><p style="color: #00007A">Text</p></li>
</ul>
</div>
<p>Text</p>
<p>Text</p>
<p style="text-align:center; font-weight:bold;">Text</p>
<div id="countbox" style="color:white; text-align:center; font-size:0.875em; font-weight:bold;"></div>
</td>
</tr>
</table>
Code:
.news_box {
width: 25%;
padding: 7px;
float: right;
background: #1e90ff;
border:2px solid #ffffff;
margin:10px;
font-size: 0.875em;
font-weight: normal;
}
Now, this all works fine, except: it resets the text size (which is slightly reduced, from 1em to 0.875em, on my site) to 1, on the whole page, despite the correct text size being set in every bloody place I can think of. If I remove the div, all is fine, replace it, all text is screwed.
Another interesting point is my CSS file; if I put the div info near the start of the file, it works (apart from the text), if I put it near the end - it is ignored! What the hell?
Can anyone offer some advice, for what I am sure is a trivial issue for someone in the know. I can post the links and html/css files if that would help - its only a single page and single css file.
Thanks hopefully...
Kata