14 replies [Last post]
mmahad
Offline
Regular
Last seen: 14 years 31 weeks ago
Timezone: GMT+5
Joined: 2006-03-19
Posts: 14
Points: 0

Hello,

I have made two rows using span, it shows in IE but not in FireFox...

I have attached my HTML + CSS code...

Please check what is wrong? Please help...

Thanks....

<HTML>

<html>

<head>
<title>New Page 1</title>
<meta>
<meta>
<LINK>
</head>

<body>
<span>Hello</span>
<span>Hello</span>
</body>

</html>

<CSS>

.row1 {
background-color: #ffffff;
border: 1px solid #D1D1D0;
border-left:0;
border-right:0;
font-family: Verdana, Arial, Helvetica, sans-serif;
font-weight: bold;
color: #916515;
height: 22px;
padding-top: 3px;
width: 610px;
padding-left: 15px;}

.row2 { background-color: #D1D1D0;
border: 1px solid #111111;
border-left:0;
border-right:0;
font-family: Verdana, Arial, Helvetica, sans-serif;
font-weight: bold;
color: #0077A9;
height: 22px;
padding-top: 3px;
width: 610px;
padding-left: 15px;
}

fberriman
fberriman's picture
Offline
Enthusiast
Reading, England, UK
Last seen: 13 years 34 weeks ago
Reading, England, UK
Joined: 2006-06-02
Posts: 146
Points: 0

SPAN problem

Is that all of your code? If it is, you seem to be missing a doctype (DTD) declaration at the top, so I'd add that first, and then look at the rest.

If that's not all your code (which I suspect it isn't, as the spans seem to be class-less currently), paste it in again, but make sure to check the "disable HTML in this post" checkbox, or even better, show us a live test page! Wink

-- Frances

mmahad
Offline
Regular
Last seen: 14 years 31 weeks ago
Timezone: GMT+5
Joined: 2006-03-19
Posts: 14
Points: 0

SPAN problem

Yes that is all my code is... I don't have any live example... I was just trying to make these type of rows... It works in IE but not in Firefox... Is the doctype necessary? Will it work if I out in a doctype?

fberriman
fberriman's picture
Offline
Enthusiast
Reading, England, UK
Last seen: 13 years 34 weeks ago
Reading, England, UK
Joined: 2006-06-02
Posts: 146
Points: 0

SPAN problem

That can't be all your code - look at what you pasted. It's missing the classes on the spans and there's no DTD.

Paste it again, but check the box, then we'll start looking at what's wrong.

-- Frances

mmahad
Offline
Regular
Last seen: 14 years 31 weeks ago
Timezone: GMT+5
Joined: 2006-03-19
Posts: 14
Points: 0

SPAN problem

Here is the code again.. I have now realized about the span classes missing... sorry... I did not know where did they go as I had pasted it before.... anyways code is here.. as far as DTD is concern I have not pasted any DTD.... and I don't think that if firefox is not showing this will be a problem of DTD... This is what I have ... and this is the final...

<!----------------------- HTML here ------------------------->

<html>

<head>
<title>New Page 1</title>
<meta http-equiv="Content-Language" content="en-us">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<LINK href="check.css" type=text/css rel=stylesheet>
</head>

<body>
<span class="row1">Hello</span>
<span class="row2">Hello</span>
</body>

</html>

<!------------------- CSS here ------------------->

.row1 {
background-color: #ffffff;
border: 1px solid #D1D1D0;
border-left:0;
border-right:0;
font-family: Verdana, Arial, Helvetica, sans-serif;
font-weight: bold;
color: #916515;
height: 22px;
padding-top: 3px;
width: 610px;
padding-left: 15px;}

.row2 { background-color: #D1D1D0;
border: 1px solid #111111;
border-left:0;
border-right:0;
font-family: Verdana, Arial, Helvetica, sans-serif;
font-weight: bold;
color: #0077A9;
height: 22px;
padding-top: 3px;
width: 610px;
padding-left: 15px;
}

fberriman
fberriman's picture
Offline
Enthusiast
Reading, England, UK
Last seen: 13 years 34 weeks ago
Reading, England, UK
Joined: 2006-06-02
Posts: 146
Points: 0

SPAN problem

Well, I hate to break it to you, but it's doing what is expected in Firefox for me - they're side by side and looks exactly as it does in IE.

What exactly are you seeing occuring? (I've got the pages here now to play with)

BTW; I added

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

before the <html> tag. Your pages should ALWAYS have a doctype specified.

-- Frances

mmahad
Offline
Regular
Last seen: 14 years 31 weeks ago
Timezone: GMT+5
Joined: 2006-03-19
Posts: 14
Points: 0

SPAN problem

yes!! now I have added the DTD... and yes now they are coming side by side both in IE and FIREFOX.. but it shows color in IE but not in FIREFOX... any ideas...

fberriman
fberriman's picture
Offline
Enthusiast
Reading, England, UK
Last seen: 13 years 34 weeks ago
Reading, England, UK
Joined: 2006-06-02
Posts: 146
Points: 0

SPAN problem

mmahad wrote:
yes!! now I have added the DTD... and yes now they are coming side by side both in IE and FIREFOX.. but it shows color in IE but not in FIREFOX... any ideas...

See what a difference a DTD makes Smile

What colour is missing? I can see everything you've specified. Brown text on white, and blue text on grey.

-- Frances

mmahad
Offline
Regular
Last seen: 14 years 31 weeks ago
Timezone: GMT+5
Joined: 2006-03-19
Posts: 14
Points: 0

SPAN problem

Yes... it has made difference thank you for that... but I can't see any colors in FIREFOX can you? it shows in IE but the rows are very narrow......

I changed 'spans' to 'divs' and it shows fine in IE but nothing in FIREFOX...

fberriman
fberriman's picture
Offline
Enthusiast
Reading, England, UK
Last seen: 13 years 34 weeks ago
Reading, England, UK
Joined: 2006-06-02
Posts: 146
Points: 0

SPAN problem

mmahad wrote:
Yes... it has made difference thank you for that... but I can't see any colors in FIREFOX can you? it shows in IE but the rows are very narrow......

I changed 'spans' to 'divs' and it shows fine in IE but nothing in FIREFOX...

Works fine for me, so I'm having difficulty establishing what's doing wrong for you. I switched it over to divs too, and that seems to be an improvement as far as spacing goes, but the colours are identical either way.

-- Frances

mmahad
Offline
Regular
Last seen: 14 years 31 weeks ago
Timezone: GMT+5
Joined: 2006-03-19
Posts: 14
Points: 0

SPAN problem

Now as I add a body tag in the CSS it shows the first row but not the second row in FIREFOX but the result is still the same in IE...

fberriman
fberriman's picture
Offline
Enthusiast
Reading, England, UK
Last seen: 13 years 34 weeks ago
Reading, England, UK
Joined: 2006-06-02
Posts: 146
Points: 0

SPAN problem

Okay, I gotta jet in a minute, so I don't have time to look at this, but this is my advice (it's what I'd be doing right now);

If you can't tell what's going on, start commenting out rules and see what breaks the design. Strip it right back to the basics, and start readding your rules until you find the rule which is behaving unexpectedly. When you find the rule, you'll probably be "doh, of course it was that!".

-- Frances

mmahad
Offline
Regular
Last seen: 14 years 31 weeks ago
Timezone: GMT+5
Joined: 2006-03-19
Posts: 14
Points: 0

SPAN problem

Also, if I change the secon div's class to 'row1' it shows ... I don't know why it does not show with 'row2'....

fberriman
fberriman's picture
Offline
Enthusiast
Reading, England, UK
Last seen: 13 years 34 weeks ago
Reading, England, UK
Joined: 2006-06-02
Posts: 146
Points: 0

SPAN problem

Check it's not something elementary like you've used .row2 but are stating <div id="row2"> by mistake. . = class, # = id I do silly things like that all the time.

-- Frances

mmahad
Offline
Regular
Last seen: 14 years 31 weeks ago
Timezone: GMT+5
Joined: 2006-03-19
Posts: 14
Points: 0

SPAN problem

I will try my best and will get a solution to this... Thanks for all your help and advice Smile Wink

Cheers!! Smile