10 replies [Last post]
rprincejr
Offline
newbie
Last seen: 12 years 33 weeks ago
Timezone: GMT-4
Joined: 2007-10-16
Posts: 5
Points: 0

I have a news story slider powered by php, mysql and javascript. It dynamically makes divs for the stories its currently rotating through. In IE7 it works fine. But in Firefox, its just plain broke.

I do know that I need to call out display:block to get the divs to recognize height and width, but when I do so the links stop working. I am posting 2 images below to help illustrate my problems.

CSS output in IE7

CSS output in FF (with display:block enabled)

CSS output in FF (without display:block enabled)

As for my code, I give my css and php. If the javascript is needed, ill post it.

CSS
.pagination a{
display: block;
float: left;
font-size: 10px;
color: #333333;
margin: 2px;
width: 225px;
height: 50px;
padding: 0px 8px 0px 0px;
text-decoration: none;
background-color: #e6e6e6;
border: 1px solid #666666;
}
.pagination a:hover, .pagination a.selected{
font-size: 10px;
color: #000000;
background-color: #99ccff;
border: 1px solid #0059B3;
}

.slidetitle {
font-size: 14pt;
color: black;
font-weight: normal;
}

.slidetext {
font-size: 10px;
color: #000000;
}
.slidetrans {
display: block;
position: relative;
height: 75px;
width: 471px;
top: -75px;
background-color: #ffffff;
border: 1px solid #666666;
padding: 0px 0px 0px 3px;
filter: alpha(opacity=75);
-moz-opacity:0.75;
-khtml-opacity:0.75;
opacity:0.75;
}

PHP
echo "

";
if (empty($image)) {
$mimage = "";
$timage = "";
} else {
$mimage = "";
$timage = "";
}
echo $mimage;
echo"
"
."$row[title]
$hometext $morelink
"
."
";

I cannot figure this out and Ive tried several ideas. Any help is appreciated.

Hugo
Hugo's picture
Offline
Moderator
London
Last seen: 5 years 21 weeks ago
London
Joined: 2004-06-06
Posts: 15668
Points: 2806

Agh don't show us scripting

Agh don't show us scripting show only html browser output please.

Post all your HTML and CSS not snippets and if possible a link would be handy?

Before you make your first post it is vital that you READ THE POSTING GUIDELINES!
----------------------------------------------------------------
Please post ALL your code - both CSS & HTML - in [code] tags
Please validate and ensure you have included a full Doctype before posting.
Why validate? Read Me

rprincejr
Offline
newbie
Last seen: 12 years 33 weeks ago
Timezone: GMT-4
Joined: 2007-10-16
Posts: 5
Points: 0

The pics above are browser

The pics above are browser output. A link isnt possible, this is running on my local machine (dev environment). I can attach all html and css.

AttachmentSize
index.php_.txt 15.57 KB
contentslider.css_.txt 1.37 KB
Hugo
Hugo's picture
Offline
Moderator
London
Last seen: 5 years 21 weeks ago
London
Joined: 2004-06-06
Posts: 15668
Points: 2806

point is this is a CSS/HTML

point is this is a CSS/HTML forum for frontend coding problems you're still trying to show us scripts! We need to see browser output after your script has been parsed and sent it's output.

Run your page then copy and paste the source view from your browser to the forum in between <code></code> tags

Before you make your first post it is vital that you READ THE POSTING GUIDELINES!
----------------------------------------------------------------
Please post ALL your code - both CSS & HTML - in [code] tags
Please validate and ensure you have included a full Doctype before posting.
Why validate? Read Me

rprincejr
Offline
newbie
Last seen: 12 years 33 weeks ago
Timezone: GMT-4
Joined: 2007-10-16
Posts: 5
Points: 0

Ok. Im on the same page with

Ok. Im on the same page with you now. I have given you a copy of Firefox without the display:block in the pagination and one with. Sorry.

AttachmentSize
Firefox-wo-displayblock.txt 31.98 KB
Firefox-w-displayblock.txt 31.98 KB
thepineapplehead
thepineapplehead's picture
Offline
Guru
Last seen: 10 weeks 5 days ago
Joined: 2004-06-30
Posts: 9668
Points: 801

DTD

Incomplete doctype, fix that first and see what happens in IE Wink

Verschwindende wrote:
  • CSS doesn't make pies

rprincejr
Offline
newbie
Last seen: 12 years 33 weeks ago
Timezone: GMT-4
Joined: 2007-10-16
Posts: 5
Points: 0

IE isnt the problem. I can

IE isnt the problem. I can fix the doc type no prob. I am looking at fixing the div problem in FF.

thepineapplehead
thepineapplehead's picture
Offline
Guru
Last seen: 10 weeks 5 days ago
Joined: 2004-06-30
Posts: 9668
Points: 801

rprincejr wrote:IE isnt the

rprincejr wrote:
IE isnt the problem.

How do you know? With an incomplete doctype, IE is in Quirks Mode. Fixing the doctype may well throw it out of whack in IE.

Always test in Firefox first.

Verschwindende wrote:
  • CSS doesn't make pies

rprincejr
Offline
newbie
Last seen: 12 years 33 weeks ago
Timezone: GMT-4
Joined: 2007-10-16
Posts: 5
Points: 0

I edited my doc type to

I edited my doc type to include the full doc type. Then it forced IE to be what FF was. I just started editing my css and I finally got it. While i dont think that the doc type fix solved my problem, I do think it solved several issues Ive had in the past with getting IE and FF to behave as close to the same as possible.

Ed Seedhouse
Ed Seedhouse's picture
Offline
Guru
Victoria British Columbia
Last seen: 23 weeks 3 days ago
Victoria British Columbia
Timezone: GMT-8
Joined: 2005-12-14
Posts: 3570
Points: 675

When we tell folks to use a

When we tell folks to use a proper Doctype declaration we are not just blowing hot air you know. We do it for a reason, yet folks like yourself refuse that advice all the time.

Building a site that uses CSS for style and layout without a proper standards triggering doctype is like building a house without a foundation. You or I might not like that, but that's how it is, so get used to it.

Ed Seedhouse

Posting Guidelines

Watch out! I am carrying irony, sarcasm and satire, and know how to use them.

thepineapplehead
thepineapplehead's picture
Offline
Guru
Last seen: 10 weeks 5 days ago
Joined: 2004-06-30
Posts: 9668
Points: 801

DTD

rprincejr wrote:
I edited my doc type to include the full doc type. Then it forced IE to be what FF was.

Now you see why you should develop in Firefox Wink

Quote:
I just started editing my css and I finally got it. While i dont think that the doc type fix solved my problem, I do think it solved several issues Ive had in the past with getting IE and FF to behave as close to the same as possible.

The doctype isn't supposed to fix the problem. It's supposed to force IE into Standards Mode, so it's easier to debug and fix.

Glad you got it fixed, thanks for letting us know! Laughing out loud

Verschwindende wrote:
  • CSS doesn't make pies