Jump to content

Plz make correction in my style sheet to help my webpage to be browser compatible

- - - - -

  • Please log in to reply
3 replies to this topic

#1
justsachin4u

justsachin4u

    Learning Programmer

  • Members
  • PipPipPip
  • 32 posts
Hello frz, i have following html and css files. Problem is that these files work very well in IE but in Firefox all layout is going to be disturbed. What can we do to make this weppage to work in different browsers -

html file -

<html>

<head>

<title>Learn at your home --- www.justsachin4u.com</title>

<link rel="stylesheet" type="text/css" href="PHP/Cookies/SmallProject2/MyStyle.css">

</head>

<body>

<div class="container">

<div class="header">Free Web Tutorials</div>

<div class="topmenu"><?php include("TopMenu.php") ?></div>

<div class="leftmenu"><?php include("LeftMenu.php") ?></div>

<div class="rightmenu"><?php include("RightMenu.php") ?></div>

<div class="workarea">

<div style="border:1px solid #993333; padding:5px; color:#993333; background-color:#FFFF99; width:100%">If this is your first visit, be sure to check out the FAQ by clicking the link at bottom. You may have to register  before you can enter our member area section and use different services. Click the register link above to proceed. To start reading tutorials, select the tutorial that you want to visit from the left menu.</div>

<?php

if(isset($_REQUEST["page"]))

{

    include("WorkArea.php");

}

elseif(isset($_REQUEST["msg"]))

{

    include("Register.php");

}

else

{

    include("Home.php");

}

?>

</div>

<div class="footer"><?php include("Footer.php") ?></div>

</div>

</body>

</html>



css file -

body

{

background-image:url(PHP/Cookies/SmallProject2/Images/Texture.jpg);

background-attachment:fixed;

margin-left:200px;

}

.container

{

width:900px;

height:1000px;

background-color:white;

border:1px solid #000099;

}

.header

{

width:900px;

height:175px;

background-image:url(PHP/Cookies/SmallProject2/Images/Banner.jpg);

font:bold 48px Arial;

color:white;

text-align:center;

border-bottom:1px solid #000099;

}

ul

{

list-style-type:none;

margin:5px;

}

.topmenu

{

width:900px;

height:35px;

border-bottom:1px solid #000099;

text-align:center;

padding:1px 0px;

color:white;

font:14px verdana;

background-color:#000099;

}

.topmenu li

{

list-style-type:none;

display:inline;

margin:10px;

}

.topmenu a,a:visited

{

color:#FFFFFF;

text-decoration:none;

}

.topmenu a:hover,a:active

{

color:#00FF00;

text-decoration:underline;

}

.leftmenu

{

width:15%;

height:100%;

background-color:#CCCCCC;

font:12px verdana;

color:#000099;

float:left;

}

.leftmenu a,.rightmenu a

{

color:#000099;

text-decoration:none;

}

.leftmenu a:visited,.rightmenu a:visited

{

color:purple;

font-weight:normal;

}

.leftmenu a:hover,a:active,.rightmenu a:hover,a:active

{

color:#FF0000;

text-decoration:underline;

}

.workarea

{

width:100%;

height:100%;

background-color:#FFFFFF;

font:1em/140% arial;

color:#000099;

text-align:justify;

padding:15px;

}

.rightmenu

{

width:15%;

height:100%;

background-color:#CCCCCC;

font:12px verdana;

color:#000099;

float:right;

}

.footer

{

width:900px;

height:50px;

background-color:#000099;

color:#FFFFFF;

font:12px arial;

text-align:center;

padding:5px;

}


Plz don't take attention on PHP code. We are concerned only about the page layout and not on code. If page layout becomes fine in mozilla firefox then content will be placed automatically on correct position.

#2
WingedPanther

WingedPanther

    A spammer's worst nightmare

  • Moderators
  • 16,831 posts
  • Location:Upstate, South Carolina
  • Programming Language:C, C++, PL/SQL, Delphi/Object Pascal, Pascal, Transact-SQL, Others
  • Learning:Java, C#, PHP, JavaScript, Lisp, Fortran, Haskell, Others
What's it doing wrong? Also, what doctype did you intend to use?
Programming is a branch of mathematics.
My CodeCall Blog | My Personal Blog

#3
justsachin4u

justsachin4u

    Learning Programmer

  • Members
  • PipPipPip
  • 32 posts
I didn't mention doctype. It works fine in IE but in firefox the layout doesn't come to be good.

#4
WingedPanther

WingedPanther

    A spammer's worst nightmare

  • Moderators
  • 16,831 posts
  • Location:Upstate, South Carolina
  • Programming Language:C, C++, PL/SQL, Delphi/Object Pascal, Pascal, Transact-SQL, Others
  • Learning:Java, C#, PHP, JavaScript, Lisp, Fortran, Haskell, Others
I've found that Firefox will do interesting things to layout if you don't specify the doctype. That would be my first step.
Programming is a branch of mathematics.
My CodeCall Blog | My Personal Blog




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users