Re: Div rendering
- From: "Dave Anderson" <NPQRWPDWZGSP@xxxxxxxxxxxxx>
- Date: Wed, 9 May 2007 14:14:41 -0500
"abcd" wrote:
I have below code
Use a validator. Then learn CSS. Example at bottom.
<span style="width: 250; padding-left:0px; padding-right:5px; padding-top:0px; padding-bottom:5px">
You are using an inline element (SPAN) where a block element (such as DIV) is appropriate.
<div align=center>
[align] is a deprecated attribute for all elements except (COL, COLGROUP, TBODY, TD, TFOOT, TH, THEAD, TR).
http://www.w3.org/TR/html401/index/attributes.html
<font face="Trebuchet MS"" size="2"><b>AAA</b></font>
FONT is deprecated. Use CSS.
http://www.w3.org/TR/html401/index/elements.html
In IE it renders like 3 images in one row where as in Firefox it renders 3 images in 3 seperate lines....
That is only because you did not use a DOCTYPE declaration. Put this at the top of the document, and IE behaves like Firefox:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
What changes do I need to make it so that Firefox also shows me
these 3 images in one row....
See below.
...Is the HTML syntax correct...
Obviously not.
It sounds like you want floating elements. Here is an example using the CSS float property. Note that the outer div must use the clear property if you want to prevent subsequent content from displaying incorrectly.
Uing these style definitions...
div.Outer {
clear:both;
}
div.Container {
padding: 0px 5px 5px 0px;
width: 250px;
float: left;
}
div.Container div {
font-family: Trebuchet MS;
font-weight: bold;
text-align: center;
font-size: x-small;
}
div.Container img {
border: 0px;
}
....this code will do:
<div class="Outer">
<div class="Container">
<div>AAA</div>
<img src="/Yellow.png" height="4" width="186" />
<img src="A28.png" />
</div>
<div class="Container">
<div>BBB</div>
<img src="/Red.png" height="4" width="186" />
<img src="A28.png" />
</div>
<div class="Container">
<div>CCC</div>
<img src="/Red.png" height="4" width="186" />
<img src="A28.png" />
</div>
</div>
--
Dave Anderson
Unsolicited commercial email will be read at a cost of $500 per message. Use of this email address implies consent to these terms.
.
- Follow-Ups:
- Re: Div rendering
- From: abcd
- Re: Div rendering
- From: abcd
- Re: Div rendering
- References:
- Div rendering
- From: abcd
- Div rendering
- Prev by Date: Re: Div rendering
- Next by Date: Re: Div rendering
- Previous by thread: Re: Div rendering
- Next by thread: Re: Div rendering
- Index(es):
Relevant Pages
|
Loading