Home › Forums › JavaScript › preview in safari showing different body font colour – fine in FF
- This topic is empty.
-
AuthorPosts
-
June 20, 2011 at 9:10 am #33188
nigeldunkley
MemberHiya,
Im building a simple portfolio site for a client and have been faffing for the last hour trying to get preview to show my font in black
the link is designated black with a white rollover but it shows up as a purple colour when previewed in Safari. I’ve been through the CSS to see if I have any contradicting styles but cant find anything.
Heres a link:
http://homepages.gold.ac.uk/nigeldunkley/noam/css:
body {
font: 100% Verdana, Arial, Helvetica, sans-serif;
margin: 0; /* it’s good practice to zero the margin and padding of the body element to account for differing browser defaults */
padding: 0;
text-align: center; /* this centers the container in IE 5* browsers. The text is then set to the left aligned default in the #container selector */
background-color: #FFF;
}
.twoColFixLtHdr #container {
width: 1035px; /* using 20px less than a full 800px width allows for browser chrome and avoids a horizontal scroll bar */
background: #FFFFFF;
margin: 0 auto;
text-align: left; /* this overrides the text-align: center on the body element. */
font-family: Arial, Helvetica, sans-serif;
color:#000;
}
.twoColFixLtHdr #header {
padding: 0 10px 0 20px; /* this padding matches the left alignment of the elements in the divs that appear beneath it. If an image is used in the #header instead of text, you may want to remove the padding. */
background-color: #FFF;
}
.twoColFixLtHdr #header h1 {
margin: 0; /* zeroing the margin of the last element in the #header div will avoid margin collapse – an unexplainable space between divs. If the div has a border around it, this is not necessary as that also avoids the margin collapse */
padding: 10px 0; /* using padding instead of margin will allow you to keep the element away from the edges of the div */
font-size: 24px;
font-weight: lighter;
letter-spacing: 8px;
}
.twoColFixLtHdr #sidebar1 {
float: left; /* since this element is floated, a width must be given */
width: 100px; /* the background color will be displayed for the length of the content in the column, but no further */
padding: 15px 10px 15px 20px;
background-color: #FFF;
min-height: 200px;
}
.twoColFixLtHdr #mainContent {
margin: 0 0 0 150px; /* the left margin on this div element creates the column down the left side of the page – no matter how much content the sidebar1 div contains, the column space will remain. You can remove this margin if you want the #mainContent div’s text to fill the #sidebar1 space when the content in #sidebar1 ends. */
padding: 0 20px; /* remember that padding is the space inside the div box and margin is the space outside the div box */
min-height: 646px;
color:#000;
}.twoColFixLtHdr2 #mainContent {
margin: 0 0 0 150px; /* the left margin on this div element creates the column down the left side of the page – no matter how much content the sidebar1 div contains, the column space will remain. You can remove this margin if you want the #mainContent div’s text to fill the #sidebar1 space when the content in #sidebar1 ends. */
padding: 0 20px; /* remember that padding is the space inside the div box and margin is the space outside the div box */
min-height: 646px;
font-size:12px
}h2 {
margin: 0; /* zeroing the margin of the last element in the #header div will avoid margin collapse – an unexplainable space between divs. If the div has a border around it, this is not necessary as that also avoids the margin collapse */
padding: 10px 0; /* using padding instead of margin will allow you to keep the element away from the edges of the div */
font-size: 12px;
font-weight: lighter;
letter-spacing: 8px;
color: #000;
}a:link {
color: #000;
text-decoration: none;
}
a:visited {
text-decoration: none;
}
a:hover {
text-decoration: none;
color: #FFF;
}
a:active {
text-decoration: none;
}.twoColFixLtHdr #footer {
background-color: #FFF;
text-align: left;
font-family: Arial, Helvetica, sans-serif;
font-size: 10px;
padding-top: 0;
padding-right: 10px;
padding-bottom: 0;
padding-left: 150px;
}
.twoColFixLtHdr #footer p {
margin: 0; /* zeroing the margins of the first element in the footer will avoid the possibility of margin collapse – a space between divs */
padding: 10px 0; /* padding on this element will create space, just as the the margin would have, without the margin collapse issue */
}
.fltrt { /* this class can be used to float an element right in your page. The floated element must precede the element it should be next to on the page. */
float: right;
margin-left: 8px;
}
.fltlft { /* this class can be used to float an element left in your page */
float: left;
margin-right: 8px;
}
.clearfloat { /* this class should be placed on a div or break element and should be the final element before the close of a container that should fully contain a float */
clear:both;
height:0;
font-size: 1px;
line-height: 0px;
}Thanks in advance for having a peak
nJune 20, 2011 at 9:14 am #81901nigeldunkley
MemberThanks boring code –
I just tried the same on a different computer and found that when it lands on the initial page the links are black but if I click a link (which are temporarily sent to ‘#’ then all go purple –
Is this normal?thanks again
June 20, 2011 at 9:55 am #81904Brightonmike
MemberYou need to set the colour of visited links, to over-ride the browsers default visited link colour.
June 20, 2011 at 10:03 am #81907nigeldunkley
Member@brightonmike –
you’re the man!
thanks – done -
AuthorPosts
- The forum ‘JavaScript’ is closed to new topics and replies.