divadiva Posted March 12, 2009 Share Posted March 12, 2009 For some reason css is not included in detail view. Here is the code: <HEAD> <TITLE>; Inventory Database > View Inventory</TITLE> <LINK REL="stylesheet" TYPE="text/css" HREF="style.css"> </HEAD> <FORM ACTION="view.php" METHOD="POST"> <? ********** CSS IS NOT INCLUDED IN NEXT PORTION*****is THERE A WAY TO INCLUDE IT? <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" WIDTH="100?"> <TBODY> <TR> <TD ALIGN="CENTER"><A HREF="view.php">New Search</A></TD> </TR> Quote Link to comment https://forums.phpfreaks.com/topic/149102-handling-css/ Share on other sites More sharing options...
rhodesa Posted March 12, 2009 Share Posted March 12, 2009 there is no reason i see that would block the CSS from affecting the HTML. what is the contents of style.css? or even better, do you have a url to the page? Quote Link to comment https://forums.phpfreaks.com/topic/149102-handling-css/#findComment-782916 Share on other sites More sharing options...
alphanumetrix Posted March 12, 2009 Share Posted March 12, 2009 I see a reason. This is a bad code: <LINK REL="stylesheet" TYPE="text/css" HREF="style.css"> Try this: <link rel="stylesheet" href="style.css" type="text/css" /> also check to make sure your css is linked properly, and there's actually valid codes inside it. Quote Link to comment https://forums.phpfreaks.com/topic/149102-handling-css/#findComment-782917 Share on other sites More sharing options...
phpdragon Posted March 12, 2009 Share Posted March 12, 2009 also in your table width you have a ? Quote Link to comment https://forums.phpfreaks.com/topic/149102-handling-css/#findComment-782918 Share on other sites More sharing options...
premiso Posted March 12, 2009 Share Posted March 12, 2009 I see a reason. This is a bad code: No, html is not that strict. It would not validate for xhtml, however with the first one. All you did was change from uppercase to lower and added the / which in no way effects HTML other than making it validate with W3C standards for XHtml. Quote Link to comment https://forums.phpfreaks.com/topic/149102-handling-css/#findComment-782920 Share on other sites More sharing options...
divadiva Posted March 12, 2009 Author Share Posted March 12, 2009 Thank you all for replying I tried adding lower case.It still doesnt work. Also,I have added ? as earlier I had asp tags . here is my css file : html { margin:0px 0px 0px 0px; } body { color: black; font-family: Verdana, Arial; font-size: 12px; font-weight: normal; margin:0px 0px 0px 0px; background:url("backg1.gif"); } p,td,li { color: black; font-family: Verdana, Arial; font-size: 11px; } .maintable { background: url('backg.gif'); background-repeat:no-repeat; } .head { font-size:14px; font-family: Arial; font-weight:bold; color:#FFFFFF; } .red { color:#FF0000; } .blue { color:#0000FF; } .dtable { background-color:#027EC2; } .dtable TD { background-color:#FFFFFF; } .dtable TH { font-weight:bold; background-color:#B6DAF2; } .dtable2 TD { font-weight:bold; background-color:#B6DAF2; } .dtable3 TD { font-size: 9px; } .gtable { background-color:#BFBFBF; } .gtable TD { background-color:#FFFFFF; } .gtable TH { font-weight:bold; background-color:#B6DAF2; } .ntable { background-color:#FFFFFF; } .ntable TD { background-color:#FFFFFF; } .ntable TH { font-weight:bold; background-color:#FFFFFF; } .otable { background-color:#FFFFFF; border-collapse:collapse; } .otable TD { background-color:#FFFFFF; border-color:#027EC2; border-style:solid; border-width:1px; } .otable TH { font-weight:bold; background-color:#B6DAF2; border-color:#027EC2; border-style:solid; border-width:1px; } .otable1 TD { background-color:#EEEEEE; border-color:#027EC2; border-style:solid; border-width:1px; } .otable2 TD { background-color:#FFFFFF; border-width:0px; } A:link { color: #16629A; TEXT-DECORATION: none; } A:visited { color: #16629A; TEXT-DECORATION: none; } A:hover { color: #FF0000; TEXT-DECORATION: none; } .menu { color: #FFFFFF; } .menu A:link { color: #FFFFFF; TEXT-DECORATION: none; } .menu A:visited { color: #FFFFFF; TEXT-DECORATION: none; } .menu A:hover { color: #FFFF00; TEXT-DECORATION: none; } .hr { color: #027EC2; height: 1px; } Quote Link to comment https://forums.phpfreaks.com/topic/149102-handling-css/#findComment-782927 Share on other sites More sharing options...
phpdragon Posted March 12, 2009 Share Posted March 12, 2009 what exactly doesnt work from the style sheet as I dont see any references on your bit of code that are in your stylesheet Quote Link to comment https://forums.phpfreaks.com/topic/149102-handling-css/#findComment-782932 Share on other sites More sharing options...
rhodesa Posted March 12, 2009 Share Posted March 12, 2009 i used that stylesheet with this file and everything worked fine: <HTML> <HEAD> <TITLE>; Inventory Database > View Inventory</TITLE> <LINK REL="stylesheet" TYPE="text/css" HREF="style.css"> </HEAD> <BODY> <FORM ACTION="view.php" METHOD="POST"> <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" WIDTH="100?"> <TBODY> <TR> <TD ALIGN="CENTER"><A HREF="view.php">New Search</A></TD> </TR> </TBODY> </TABLE> </FORM> </BODY> </HTML> Quote Link to comment https://forums.phpfreaks.com/topic/149102-handling-css/#findComment-782933 Share on other sites More sharing options...
divadiva Posted March 12, 2009 Author Share Posted March 12, 2009 Thank you fro replying. stylesheet is included.But It is messing the table width . I have to manually change the width and formatting.Any comments? Quote Link to comment https://forums.phpfreaks.com/topic/149102-handling-css/#findComment-782935 Share on other sites More sharing options...
rhodesa Posted March 12, 2009 Share Posted March 12, 2009 nothing in your stylesheet affects the width of the table Quote Link to comment https://forums.phpfreaks.com/topic/149102-handling-css/#findComment-782940 Share on other sites More sharing options...
premiso Posted March 12, 2009 Share Posted March 12, 2009 <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" WIDTH="100%"> Notice that in the code before it was 100? and now it is 100% that should fix the issue (or change it to what it should be.) Quote Link to comment https://forums.phpfreaks.com/topic/149102-handling-css/#findComment-782954 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.