Closed Bug 352829 Opened 19 years ago Closed 19 years ago

Wrong understanding and swoing HTML tags and CSS

Categories

(Firefox :: General, defect)

x86
Windows XP
defect
Not set
major

Tracking

()

RESOLVED INVALID

People

(Reporter: volgot, Unassigned)

References

()

Details

Attachments

(1 file)

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.7) Gecko/20060909 Firefox/1.5.0.7 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.7) Gecko/20060909 Firefox/1.5.0.7 FIELDSET and DIV tags ALLWAYS breaking into different lines even if they are enclosed into another tags, and the CSS sizes of simple html tags like STRONG allways ingnoring, the IE and Opera don't do it, so it's complitly stupid. Reproducible: Always Steps to Reproduce: 1. <fieldset style="width:158px;border:0;padding-bottom:20px"><legend style="padding-bottom:3px">$rescat[title]</legend><div style="background-image:url($cat_img);background-position: center center; background-repeat: no-repeat;width:110px;height:90;margin-left:9px;margin-top:20px;border: white 1px solid" bgcolor=white><img src=/inc/img/blank.gif width=110 height=90 alt="$rescat[title]" border=0></a></div></fieldset> 2. <strong style="width:158px;border:0;padding-bottom:20px"><legend style="padding-bottom:3px">$rescat[title]</legend><fieldset style="background-image:url($cat_img);background-position: center center; background-repeat: no-repeat;width:110px;height:90;margin-left:9px;margin-top:20px;border: white 1px solid" bgcolor=white><img src=/inc/img/blank.gif width=110 height=90 alt="$rescat[title]" border=0></a></fieldset></strong> 3. <strong style="width:158px;border:0;padding-bottom:20px"><legend style="padding-bottom:3px">$rescat[title]</legend><fieldset style="background-image:url($cat_img);background-position: center center; background-repeat: no-repeat;width:110px;height:90;margin-left:9px;margin-top:20px;border: white 1px solid" bgcolor=white><img src=/inc/img/blank.gif width=110 height=90 alt="$rescat[title]" border=0></a></strong></strong> 4. <strong style="width:158px;border:0;padding-bottom:20px"><legend style="padding-bottom:3px">$rescat[title]</legend><div style="background-image:url($cat_img);background-position: center center; background-repeat: no-repeat;width:110px;height:90;margin-left:9px;margin-top:20px;border: white 1px solid" bgcolor=white><img src=/inc/img/blank.gif width=110 height=90 alt="$rescat[title]" border=0></a></div></strong> Actual Results: Look up Expected Results: Look on Opera and IE Learn more HTML and CSS, go to W3Schools.
Reporter, can you attach testcases here please? ("Create a New Attachment") Thanks.
Attached file HTML example
The example doesn't pass validation as an HTML document. Can you correct the validation errors in the example? That's likely the issue here. Some problems with validation that I've found: Each fieldset must contain a legend. That legend must be the first child of the fieldset. The strong tag is an inline tag and cannot contain non-inline tags like fieldsets and divs.
CSS width does not apply to inline elements: see http://www.w3.org/TR/CSS21/visudet.html#the-width-property FIELDSET and DIV are block-level elements, whether or not they are contained in other elements, and thus start on new lines. If you want a block-level element to act like an inline element, you need to give it "display: inline" (and expect unexpected results). There are many fine resources online for learning how CSS and HTML are supposed to work. W3Schools doesn't happen to be among them.
Status: UNCONFIRMED → RESOLVED
Closed: 19 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: