Designing HTML for safari

S

Stanley

Guest
Hmmm...
Safari seems like a nice browser, but somehow the webpages that I'm making are rendered differently on ie5 (mac) than on Safari (the tables aren't showing right)...

What should I know about designing HTML pages for safari ?
Cause i'm missing something here :)

greets
Stanley
 
Joined
Jun 11, 2003
Messages
4,915
Reaction score
68
Points
48
Location
Mount Vernon, WA
Your Mac's Specs
MacBook Pro 2.6 GHz Core 2 Duo 4GB RAM OS 10.5.2
I think you probably have something wrong with your html code, especially if tables are not showing up right :) If you could show me some code I might be able to help you out :)
 
OP
S

Stanley

Guest
Hey Murlyn,
Just solved my problem...

I used a stylesheet for a bit of text in a cell and put the class on the "td"-tags. The table got all distorted...But when I used "span"-tags and gave the class there, everything fell in place. Explorer didn't mind... strange.

Site: sometimestanley.com (outdated link removed)
Under construction: sometimestanley.solidweb.be/portal_2003/index_testmode.htm

Stanley
 
Joined
Jun 11, 2003
Messages
4,915
Reaction score
68
Points
48
Location
Mount Vernon, WA
Your Mac's Specs
MacBook Pro 2.6 GHz Core 2 Duo 4GB RAM OS 10.5.2
Yeah IE allows for messy code, while most browsers try to reduce the mess by having us codeheads not be so lazy :) Glad you got it fixed! :)

Pretty smooth site you have there :) nice design!
 
OP
M

meerk

Guest
Browsers

I currently design and check in 4 browsers. Moz, NS, IE and Safari primarily using a combination of CSS and tables (eek!). I can normally get it right in 3 outta 4, but usually there's always a 'hiccup'.
In times like these I look at the 'stats' from our company website and reassure myself that 95% of users are using IE5+.
So my advice is 'go with the flow', even though Safari and Mozilla are far superior browsers (read: more compliant web standards way)

Si…
 
Joined
Jan 15, 2003
Messages
4
Reaction score
16
Points
3
Location
Whangarei, New Zealand
Your Mac's Specs
Pwnt
Safari has pretty good CSS support. Check out http://www.csszengarden.com - while IE on os9 (dunno about osx though) messes it up horribly, safari renders the whole site brilliantly.

I think I'll switch to pure css soon.
 
OP
S

spinsterkiss

Guest
curses and blast

hullo stanley and murlyn,

i must be a complete idiot but, uh, i can't get my tables to centre in safari. really it's just the table on the index page of my site. it's supposed to be centred and, well, it's not.

since you have obviously had a similar problem, do you have any suggestions as to what i can do?

thanks,
nan
 
Joined
Feb 25, 2003
Messages
5,279
Reaction score
138
Points
63
Location
Tropical Island, Jealous?
Your Mac's Specs
MacPro 3.0Ghz 16GB RAM, 4x256 Vid, 30''cinema display
Hmm, you guys are having trouble with safari, and I can't get things to look pretty in Netscape or IE :) (IE being the worst of the two), which is why I prefer Mozilla or one of the other like web browsers. To me my page looks best in safari, and im lazy and use GoLive 6 as much as I can.. (somethings just can't be done in it though :(, one step from total laze)
 
Joined
Jun 11, 2003
Messages
4,915
Reaction score
68
Points
48
Location
Mount Vernon, WA
Your Mac's Specs
MacBook Pro 2.6 GHz Core 2 Duo 4GB RAM OS 10.5.2
Within your table tag put an " align="center" " so it would look like this:

<table align="center'> and if it is still not centering then you're having a different problem and you'll need to post the code.. or attach the code
 
OP
S

Stanley

Guest
Make a big table that covers the whole screen, and make sure that everything in the <td> tag is centered horizontal and vertical.
Look at this mini htmlpage:
****************************************************************
<html>
<head>
</head>
<body>
<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0" align="center">
<tr>
<td align="center" valign="middle" height="450">
content goes here...
</td>
</tr>
</table>
</body>
</html>
****************************************************************

cheers,
Stanley
 
OP
S

spinsterkiss

Guest
murlyn,

thanks for the beta. from what i can tell, my table align does ="center". here's the code. if you have time to make sense of it, super. if not, i'll keep trying. perhaps what stanley said about making the entire page into a table and then nesting tables. the centre issue isn't occurring on any other page within my site so it is frustratus maximus...

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>spinsterkiss - nancy nassef's e-home</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
if (a.indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a;}}
}

function MM_swapImgRestore() { //v3.0
var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a)&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v4.01
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers.document);
if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
if ((x=MM_findObj(a))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
//-->
</script>
</head>

<body bgcolor="dcdcfb" text="000080" link="000080" vlink="000080" onLoad="MM_preloadImages('images/travel2_over.jpg','images/knits_over.jpg','images/writing_over.jpg','images/cv_over.jpg','images/projects_over.jpg','images/education_over.jpg','images/about_over.jpg')">
<div align="right">
<table width="75" border="0" align="right">
<tr>
<td colspan="3"><div align="right"><img src="images/title.jpg" alt="spinsterkiss" width="359" height="68"></div></td>
</tr>
</table>
<p> </p>
<p> </p>
<table width="41%" border="0" align="left">
<tr>
<td width="53%"> <p align="left"><font face="Verdana, Arial, Helvetica, sans-serif">you
have found the on-line<br>
home of nancy nassef. <br>
</font></p></td>
</tr>
</table>
<p> </p>
<br>

<table width="89" border="0" align="center">
<tr>
<td><div align="center"><font face="Verdana, Arial, Helvetica, sans-serif">enjoy.</font></div></td>
</tr>
</table>

<br>
<table width="269" height="269" border="0" align="center">
<tr>
<td width="22%"><a href="travel.html" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('travel','','images/travel2_over.jpg',1)"><img src="images/travel2.jpg" alt="travel" name="travel" width="89" height="89" border="0"></a></td>
<td width="28%"><a href="knits.html" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('knits','','images/knits_over.jpg',1)"><img src="images/knits.jpg" alt="knits" name="knits" width="89" height="89" border="0"></a></td>
<td width="50%"><a href="writing.html" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('writing','','images/writing_over.jpg',1)"><img src="images/writing.jpg" alt="writing" name="writing" width="89" height="89" border="0"></a></td>
</tr>
<tr>
<td><a href="cv.html" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('cv','','images/cv_over.jpg',1)"><img src="images/cv.jpg" alt="curriculum vitae" name="cv" width="89" height="89" border="0"></a></td>
<td><a href="projects.html" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('projects','','images/projects_over.jpg',1)"><img src="images/projects.jpg" alt="projects" name="projects" width="89" height="89" border="0"></a></td>
<td><a href="education.html" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('education','','images/education_over.jpg',1)"><img src="images/education.jpg" alt="education" name="education" width="89" height="89" border="0"></a></td>
</tr>
<tr>
<td> </td>
<td><a href="about.html" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('about','','images/about_over.jpg',1)"><img src="images/about.jpg" alt="about me" name="about" width="89" height="89" border="0"></a></td>
<td> </td>
</tr>
</table>
<br>
<table width="40%" border="0" align="center">
<tr>
<td><div align="center"><font size="-4" face="Verdana, Arial, Helvetica, sans-serif">©
nancy nassef, 2003. all rights reserved.</font></div></td>
</tr>
<tr>
<td><div align="center">
<pre><font size="-4" face="Verdana, Arial, Helvetica, sans-serif"><a href="mailto:[email protected]">email: [email protected]</a></font></pre>
</div></td>
</tr>
</table>
<p align="center"> </p>

</div>
</body>
</html>
 
Joined
Jan 15, 2003
Messages
4
Reaction score
16
Points
3
Location
Whangarei, New Zealand
Your Mac's Specs
Pwnt
spinsterkiss said:
murlyn,

thanks for the beta. from what i can tell, my table align does ="center". here's the code. if you have time to make sense of it, super. if not, i'll keep trying. perhaps what stanley said about making the entire page into a table and then nesting tables. the centre issue isn't occurring on any other page within my site so it is frustratus maximus...

</head>

<body bgcolor="dcdcfb" text="000080" link="000080" vlink="000080" onLoad="MM_preloadImages('images/travel2_over.jpg','images/knits_over.jpg','images/writing_over.jpg','images/cv_over.jpg','images/projects_over.jpg','images/education_over.jpg','images/about_over.jpg')">
<div align="right">
<table width="75" border="0" align="right">
<tr>
<td colspan="3"><div align="right"><img src="images/title.jpg" alt="spinsterkiss" width="359" height="68"></div></td>
</tr>
</table>
<p> </p>
<p> </p>
<table width="41%" border="0" align="left">
<tr>
<td width="53%"> <p align="left"><font face="Verdana, Arial, Helvetica, sans-serif">you
have found the on-line<br>
home of nancy nassef. <br>
</font></p></td>
</tr>
</table>
<p> </p>
<br>

<table width="89" border="0" align="center">

Change the two 'right's in bold to 'center' - see if that helps. Only change the one inside the <div> tag if you don't want "you have found the online homepage of nancy ...etc..." in the center.
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top