Forum Moderators: not2easy

Message Too Old, No Replies

bug in mazola 7.1

         

Kysmiley

2:42 am on Apr 11, 2004 (gmt 0)

10+ Year Member



In explorer the 5 and 6 the page looks fine yet in netscape 7.1 even with the h1,h2, and h3 set to center align the text is showing up on the left do i have to use divs for every time i want text centered or positioned on netscape?
or do i have to code it into all the html as align="center">
Pat

Rambo Tribble

2:49 am on Apr 11, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Show us the code.

Kysmiley

10:44 am on Apr 11, 2004 (gmt 0)

10+ Year Member



Here is the code, sorry i did not think of putting this on before. I wanted my logo top left and tried div for the with a div.body to keep the rest of teh page the way i wanted it but then the class="left" img float would not align the text left would I also need to put that float in a div also. I was hoping to cut down the size of the html coding somewhat
CSS
body {
margin: 5; color: black; background-color: #A2B991; }
hr {
color: #FFF8DC; }
h1 {
font-size: 3em; color: black; background: transparent; }
h2 {
font-size: 2em; color: black; background: transparent; }
h3, p {
font-size: 1.65em; color: black; background: transparent; }
h1, h2, h3, {
text-align: center; }
img.left {
float: left; border: inset 6px #A2B985; margin-right: 10px; } /* left img float */
img.right {
float: right; border: inset 6px #A2B985; margin-left: 10px; } /* right img float */
span.ptitl {
font-size: 1em; font-weight: bold; color: black; background: transparent; font-family: "TypoUpright BT" , "monotype corsiva" , script , goudy; } /* Picture title settings */
div.cnt (
text-align: center; }
div p {
font-size: 1.5em; color: black font-weight: bold; font-family: "TypoUpright BT" , "monotype corsiva" , script , goudy; }
div h1 {
font-size: 2.5em; color: black font-weight: bold; font-family: "TypoUpright BT" , "monotype corsiva" , script , goudy; }
div h2 {
font-size: 2em; color: black font-weight: bold; font-family: "TypoUpright BT" , "monotype corsiva" ,
script; }

HTML coding

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html><head>
<title>Sunsets</title>
<link rel="stylesheet" type="text/css" href="ph.css">
<style type="text/css" media="all">

</style></head><body>

<a href="http://somthing><img border="0" src="pdhdsm.gif" alt="logo" width="200" height="86"></a></p>

<img border="0" src="rdhd.jpg" alt="road img" width="200" height="126"><br></p>
<h1>Sunrises And Sunsets</h1><br>
<h2>"
somthing"</h2><br>

<p><a href="mh.htm"><img src="P41sm.jpg" class="left" alt="City Park" syle=width: "200" height: "150"></a>
<span class="ptitl">"somthing "<br>somewhere</span>
<br style="clear: left"></p><hr>

I have even tried to take out the body (text:align center; } and put in a div.body tag but it still did not work as then all the float left text was also centered it was of its parent and centering what would i need to include in CSS to keep it from taking on its parent properties and using the ones designated for it.

Sorry for the a long post I did not know how to condence it any further for clarity
Pat
I have to say being knew to CSS i am enjoying the challanges it is offering me.

Rambo Tribble

1:15 pm on Apr 11, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I think it is your syntax that is causing you problems. It should be text-align:center;. Note that you must have a semicolon (;) between every rule. In your sample many are missing. The following centers in Mozilla.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN""http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>Centering 4.11.04</title>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
<style type="text/css">
<!--
.ctr{text-align:center;}
-->
</style>
</head>
<body>
<div class="ctr"><h1>title</h1></div>
</body>
</html>

jdMorgan

3:01 pm on Apr 11, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member




div.cnt (
text-align: center; }

Also, the left parenthese in this snippet of your code should be a left bracket instead...

Jim

aeve

3:08 pm on Apr 11, 2004 (gmt 0)

10+ Year Member



Start by validating your code,
CSS:
[jigsaw.w3.org...]
and html:
[validator.w3.org...]

It's impossible to get consistent results with invalid code. Internet explorer is very forgiving but many other browsers aren't.