dare87 Posted March 23, 2008 Share Posted March 23, 2008 So here is my problem. I have my set of links on the left of my site. The look is done with css. As you can see I have a class that is called sideBarTitle. I originally plan not have this as a link, but things change. Is there a way to do a php code, that makes the css, think it's not a link, or does anyone have an idea on how to change the css.. I have been working on it for the last few hours. Thanks <ul> <li class="sideBarTitle">Main</li> <li><a href="index.php">Home</a></li> <li><a href="applications.php">Applications</a></li> <li><a href="download_2003.php">Demo Spreadsheet</a></li> <li class="sideBarTitle"><a href="ss_solutions.php">Spreadsheet</a></li> <li><a href="uc.php">Discussion</a></li> <li><a href="ss_consultation.php">Consultation</a></li> <li><a href="ss_development.php">Development</a></li> <li class="sideBarTitle"><a href="acad_solutions.php">AutoCAD</a></li> <li><a href="uc.php">Discussion</a></li> <li><a href="uc.php">Consultation</a></li> <li><a href="uc.php">Development</a></li> <span id="sideTitle"><a href="prgm_solutions.php">Programmables</a></span> <li><a href="uc.php">Discussion</a></li> <li><a href="uc.php">Consultation</a></li> <li><a href="uc.php">Development</a></li> <li class="sideBarTitle">Info</li> <li><a href="testimonials.php">Testimonials</a></li> <li><a href="contact.php">Contact Us</a></li> </ul> #sideBarLeft { position: relative; left: 15px; float: left; width: 125px; padding-bottom: 15px; } #sideBarLeft ul { margin: 0; padding: 0; list-style: none; } #sideBarLeft li { width:100%; display: block; padding: 10px 0px 2px 0px; font-weight: bold; text-align:right; } #sideBarLeft li a { horizontal-align: left; width:94%; display: block; padding: 2px; } #sideBarLeft li a:link { font: 11px Verdana, Arial, Helvetica, sans-serif; color: #000000; text-decoration: none; border-bottom: 1px dashed #5b7aa4; font-weight: normal; } #sideBarLeft li a:visited { font: 11px Verdana, Arial, Helvetica, sans-serif; color: #000000; text-decoration: none; border-bottom: 1px dashed #5b7aa4; font-weight: normal; } #sideBarLeft li a:hover { font: 11px Verdana, Arial, Helvetica, sans-serif; color: #000000; background: #e3e3e3; font-weight: normal; border-bottom: 1px dashed #5b7aa4; text-decoration: none; } .sideBarTitle { font: 12px Verdana, Arial, Helvetica, sans-serif; border-bottom: 1px solid #000000; } /* Quote Link to comment https://forums.phpfreaks.com/topic/97433-solved-brain-fart/ Share on other sites More sharing options...
haku Posted March 23, 2008 Share Posted March 23, 2008 What do you mean "think its not a link"? If you don't want a link, don't output the a tags. Quote Link to comment https://forums.phpfreaks.com/topic/97433-solved-brain-fart/#findComment-498560 Share on other sites More sharing options...
dare87 Posted March 23, 2008 Author Share Posted March 23, 2008 I want it to be a link. I just don't want it to take the css style that is set for links, I want it to take the sideBarTitle style Quote Link to comment https://forums.phpfreaks.com/topic/97433-solved-brain-fart/#findComment-498660 Share on other sites More sharing options...
bronzemonkey Posted March 23, 2008 Share Posted March 23, 2008 If it's a title, don't put it in the list...make it a heading. Quote Link to comment https://forums.phpfreaks.com/topic/97433-solved-brain-fart/#findComment-498714 Share on other sites More sharing options...
TheFilmGod Posted March 25, 2008 Share Posted March 25, 2008 #sideBarLeft li a:link { ... } change all those link classes to: #sideBarLeft li#change a:link { } then in the html: <li id="change"><a href=#"></a></li> something like that. I didn't test it out so I"m not 100% sure. Quote Link to comment https://forums.phpfreaks.com/topic/97433-solved-brain-fart/#findComment-500006 Share on other sites More sharing options...
dare87 Posted March 25, 2008 Author Share Posted March 25, 2008 Can you explain that a little better? Thanks! Quote Link to comment https://forums.phpfreaks.com/topic/97433-solved-brain-fart/#findComment-500108 Share on other sites More sharing options...
dbrimlow Posted March 25, 2008 Share Posted March 25, 2008 The quick way is to add your style "inline" ... like this: <ul> <li class="sideBarTitle" style="font: 12px Verdana, Arial, Helvetica, sans-serif; border-bottom: 1px solid #000000">Main</li> <li><a href="index.php">Home</a></li> <li><a href="applications.php">Applications</a></li> <li><a href="download_2003.php">Demo Spreadsheet</a></li> <li class="sideBarTitle"><a href="ss_solutions.php">Spreadsheet</a></li> <li><a href="uc.php">Discussion</a></li> <li><a href="ss_consultation.php">Consultation</a></li> <li><a href="ss_development.php">Development</a></li> <li class="sideBarTitle" style="font: 12px Verdana, Arial, Helvetica, sans-serif; border-bottom: 1px solid #000000"><a href="acad_solutions.php">AutoCAD</a></li> <li><a href="uc.php">Discussion</a></li> <li><a href="uc.php">Consultation</a></li> <li><a href="uc.php">Development</a></li> <span id="sideBarTitle" style="font: 12px Verdana, Arial, Helvetica, sans-serif; border-bottom: 1px solid #000000"><a href="prgm_solutions.php">Programmables</a></span> <li><a href="uc.php">Discussion</a></li> <li><a href="uc.php">Consultation</a></li> <li><a href="uc.php">Development</a></li> <li class="sideBarTitle" style="font: 12px Verdana, Arial, Helvetica, sans-serif; border-bottom: 1px solid #000000">Info</li> <li><a href="testimonials.php">Testimonials</a></li> <li><a href="contact.php">Contact Us</a></li> </ul> Quote Link to comment https://forums.phpfreaks.com/topic/97433-solved-brain-fart/#findComment-500631 Share on other sites More sharing options...
soycharliente Posted March 26, 2008 Share Posted March 26, 2008 Adding style inline defeats the purpose of having CSS in the first place. Quote Link to comment https://forums.phpfreaks.com/topic/97433-solved-brain-fart/#findComment-501219 Share on other sites More sharing options...
dbrimlow Posted March 26, 2008 Share Posted March 26, 2008 Adding style inline defeats the purpose of having CSS in the first place. True, for those who know what they are doing. But, Dare87 was riding the ol' newbie frustration train ("I have been working on it for the last few hours"). So I shot him off the quick fix. I would also assume he isn't using proper semantic coding and drops text naked into DIVs as if the were "logical block level html tags". He'll learn. Meanwhile we sometimes try to help erase the mind-numbing frustrations first. Quote Link to comment https://forums.phpfreaks.com/topic/97433-solved-brain-fart/#findComment-501696 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.