ollyno1uk2 Posted January 23, 2007 Share Posted January 23, 2007 Hi there I'm having some issues with understanding how my stylesheet works. I understand how to change my header which I have done successfully. in my header navigation I have managed to change my link colours which is great. Here is my problem. I have added another table row in between the header and the headernavigation. I want this to have the same colour links as header navigation but not the other properties such as the background colour etc. I thought the best way to do this was to create a new class. I decided copy the headernavgation sections in the CSS file and rename them headernavigation2. Then delete everything but the link colour and in the table row I wanted this to apply to simply add class = "headernavigation2" into the table row properties. This does not work. I have tried moving things, adding things etc but I can not get this to do what I want. I even tried adding to the table row <tr class="headernavigation"> and even that did not produce the same results as the tablenavigation section. I must be overlooking something simple with the stylesheet.css and the class tags. Can anyone help? Thanks a lot in advance. Link to comment Share on other sites More sharing options...
jonquil Posted January 23, 2007 Share Posted January 23, 2007 Hi, Are your edits "saving" on the server? What I mean is, are you editing via Admin>Files>edit or are you editing locally and uploading via Admin>Files (or FTP)? jon It's all just ones and zeros.... Link to comment Share on other sites More sharing options...
ollyno1uk2 Posted January 23, 2007 Author Share Posted January 23, 2007 Hi, Are your edits "saving" on the server? What I mean is, are you editing via Admin>Files>edit or are you editing locally and uploading via Admin>Files (or FTP)? jon I'm uploading via FTP and yes the settings are saving on the server Thanks Link to comment Share on other sites More sharing options...
jonquil Posted January 23, 2007 Share Posted January 23, 2007 Could you pls provide a URL and also the code here for your includes/header.php? I'll try to help you sort it out :) jon It's all just ones and zeros.... Link to comment Share on other sites More sharing options...
ollyno1uk2 Posted January 23, 2007 Author Share Posted January 23, 2007 Could you pls provide a URL and also the code here for your includes/header.php? I'll try to help you sort it out :) jon Hi Jon Thanks for your help <tr bgcolor = "#999999" class="headerNavigation2" ><td align = "center" colspan = "4"><font color = "white"><B>Cheap Computer Solutions for the UK</b> - <a href = “http://www.jbosolutions.co.uk/live”>Click here</a> - email [email protected] - Call 0870 803 1151 </font></td></tr> <td align="right" class="headerNavigation"><?php if (tep_session_is_registered('customer_id')) { ?><a href="<?php echo tep_href_link(FILENAME_LOGOFF, '', 'SSL'); ?>" class="headerNavigation"><?php echo HEADER_TITLE_LOGOFF; ?></a> | <?php } ?><a href="<?php echo tep_href_link(FILENAME_ACCOUNT, '', 'SSL'); ?>" class="headerNavigation"><?php echo HEADER_TITLE_MY_ACCOUNT; ?></a> | <a href="<?php echo tep_href_link(FILENAME_SHOPPING_CART); ?>" class="headerNavigation"><?php echo HEADER_TITLE_CART_CONTENTS; ?></a> | <a href="<?php echo tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'); ?>" class="headerNavigation"><?php echo HEADER_TITLE_CHECKOUT; ?></a> </td> </tr> This is the header section. You can see that i have put the class as headernavigation2. I have included the next row as this has the class of headernavigation which works fine. TR.headerNavigation { background: #FFFFFF; } TD.headerNavigation { font-family: Verdana, Arial, sans-serif; font-size: 10px; background: #FFFFFF; color: #0000FF; font-weight : bold; } A.headerNavigation { color: #0000FF; } A.headerNavigation:hover { color: #FF0000; } TR.headerNavigation2 { } TD.headerNavigation2 { } A.headerNavigation2 { color: #0000FF; } This is out of the stylesheet that I have added. The link to view it is on my test site which is www.jbosolutions.co.uk/test Thanks a lot for your help Link to comment Share on other sites More sharing options...
jonquil Posted January 23, 2007 Share Posted January 23, 2007 You haven't defined your headerNavigation2, except for its links colour: TR.headerNavigation { background : #ffffff; } TD.headerNavigation { font-family : Verdana, Arial, sans-serif; font-size : 10px; background : #ffffff; color : #0000ff; font-weight : bold; } A.headerNavigation { color : #0000ff; } A.headerNavigation:hover { color : #ff0000; } A.headerNavigation2 { color : #0000ff; } http://www.oscommerce.info/kb/osCommerce/C...n_and_Layout/54 Edit: added link to stylesheet definitions It's all just ones and zeros.... Link to comment Share on other sites More sharing options...
jonquil Posted January 23, 2007 Share Posted January 23, 2007 Mmmm, you also have a meta tag outside the head tags: <img src=images/paypalnow.gif alt="Paypal"></td> </tr> <tr height="5" bgcolor="#3399ff"> <td align = center colspan = "4"></td></tr></table> <table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <script language="JavaScript" type="text/JavaScript"> <!-- function MM_swapImgRestore() { //v3.0 var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc; } It's all just ones and zeros.... Link to comment Share on other sites More sharing options...
jonquil Posted January 23, 2007 Share Posted January 23, 2007 You also have an double open TD tag: title=" Cheap Laptops "></a></td><td><td align="center" valign = bottom> Editing the header.php is a pain in the neck, I know. jon It's all just ones and zeros.... Link to comment Share on other sites More sharing options...
ollyno1uk2 Posted January 23, 2007 Author Share Posted January 23, 2007 Hi thanks for the input. I am only trying to change the link colour of this part fro now. It is not changing though. Do I need to include all the other information? I think I know where that meta tag is so I'm going to go hunt for it now. I'll also look for the double open td tags. Nice one for spotting these. I would never have managed to! Olly Link to comment Share on other sites More sharing options...
ollyno1uk2 Posted January 23, 2007 Author Share Posted January 23, 2007 ok, I have done the 2 changes. All I need now is to get this CSS link to change to the colour specified! Thanks Link to comment Share on other sites More sharing options...
jonquil Posted January 23, 2007 Share Posted January 23, 2007 <tr bgcolor = "#999999" class="headerNavigation2" ><td align = "center" colspan = "4"><font color = "white"><B>Cheap Computer Solutions for the UK</b> - <a href = “http://www.jbosolutions.co.uk/live”>Click here</a> - email [email protected] - Call 0870 803 1151 </font></td></tr> You have spec'd the bg colour as #999999 (grey). You have also spec'd the font colour as "white." What colour do you want the font to be? jon It's all just ones and zeros.... Link to comment Share on other sites More sharing options...
ollyno1uk2 Posted January 23, 2007 Author Share Posted January 23, 2007 If I could get the CSS to work then I would do this all via CSS. For now my experiment is to purely get the link text to blue. at the moment it is the same as the rest of the main page. however the header navigation link text is blue I want headernavigation2 to have blue links as well. If I can get this working then I will be able to add the rest to the CSS file! Thanks again for all your assistance Link to comment Share on other sites More sharing options...
jonquil Posted January 23, 2007 Share Posted January 23, 2007 My point in asking what colour you actually want is to bring to your attention that you've hard-coded the color="white." This would override whatever you have spec'd in the stylesheet. You're right. Spec all the styles in the stylesheet and not have to hard-code a thing. I get that :) Like this? <tr class="headerNavigation2"><td class="headerNavigation2"><b>Cheap Computer Solutions for the UK</b> - <a href = “http://www.jbosolutions.co.uk/live”>Click here</a> - email [email protected] - Call 0870 803 1151</td></tr> stylesheet: TR.headerNavigation2 { background : #999999; } TD.headerNavigation2 { color : #0000ff; font-size : 10px; text-align : center; } It's all just ones and zeros.... Link to comment Share on other sites More sharing options...
ollyno1uk2 Posted January 23, 2007 Author Share Posted January 23, 2007 hi yes that is correct. What I don't get though is that I have not hard coded the link colour. this is using the stylesheet - is that right? So how come with my new stylesheet where I have the link as blue does it show as black? Or is it that if I add any hard coding it overrides teh stylesheet altogether? Thanks once again! Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.