Forum Moderators: not2easy
<table width="100%" height="100" border="0" cellpadding="0" cellspacing="0">
<tr>
<td align="center" valign="middle" bgcolor="#000066"><h3><font color="#FFFFFF" face="Verdana, Arial, Helvetica, sans-serif"><em><strong>Are
you really getting a good deal?<br>
</strong></em></font><em><font color="#FF9900" face="Verdana, Arial, Helvetica, sans-serif">Or
a good deal of bother?</font></em></h3></td>
</tr>
</table>
Regards Ian
It approximates your <table>. Adjust to suit.
Note: It can be done without using the wrapper #your-div but is much easier to make cross-browser compatible as shown. Especially if part of multiple nested <div>s or <table>s.
CSS:
html, body {
width: 100%; height: 100%; margin: 0; padding: 0; border: 0;
}
#your-div {
width: 100%; height: 100px; padding: 0; margin: 0; border: 0;
background: #006;
}
#your-div h3 {
padding: 1em 0 0 0; margin: 0; font: 1.25em Verdana, Arial, Helvetica, sans-serif; text-align: center;
}
.fff {color: #fff;}
.f90 {color: #f90;}
HTML:
<div id="your-div">
<h3><em class="fff"><strong>Are you really getting a good deal?</strong></em>
<br />
<em class="f90">Or a good deal of bother?</em></h3>
</div>
<h3><em class="fff"><strong>Are you really getting a good deal?</strong></em>
<br />
<em class="f90">Or a good deal of bother?</em></h3>
You could slim this down a little further by inserting:
font-weight:bold;
font-style:italic;
in the stylesheet and writing:
<h3>
<div class="first">Are you really getting a good deal?</div>
<div class="second">Or a good deal of bother?</div>
</h3>
The divs, being block-level elements, will be separated by a line break.
What browser/OS?
What doctype are you using?
If you plugged it back in a nested bunch other code might be triggering problems.
I suggest that you start from the outside in, top down (which you may well be doing). Replace one table at a time and debug as you go.
html, body {
width: 100%; height: 100%; margin: 0; padding: 0; border: 0;
it has no id so cant work out how that works, sorry if this is overlooking something simple but new to type of css.
Thanks again Ian
html, body {
width: 100%; height: 100%; margin: 0; padding: 0; border: 0;}
<html> and <body> are inherent to html. Including these elements and attributes ease some cross browser differences. I usually also include: font-size: 100%;
Leave them out and take a look at the differences between IE, Opera, and Moz. Just leveling the playing field before starting.
Glad to read things are getting there. The road to CSS is a twisty and bumpy one but well worth the trip!
So it looks like the best way to get around it is to have the Heading 3 contain two inline elements... and then style them as block-level.