Move CSS from header to stylesheet?

  • Posts: 259
  • Thank you received: 10
10 years 3 months ago #163597

In trying to keep the website code as clean and secure as possible i quickly inspected the index source code. I found this in the <head></head> section.

<style type="text/css">

#hikashop_category_information_module_105 div.hikashop_subcontainer {
	background:#FFFFFF;
}
#hikashop_category_information_module_105 .hikashop_rtop *,#hikashop_category_information_module_105 .hikashop_rbottom *{
	background:#FFFFFF;
}
			
#hikashop_category_information_module_105 div.hikashop_subcontainer,#hikashop_category_information_module_105 div.hikashop_subcontainer span {
	text-align:center;
}
#hikashop_category_information_module_105 div.hikashop_container {
	text-align:center;
}
			
#hikashop_category_information_module_105 div.hikashop_container {
	margin:10px 10px;
}
#hikashop_category_information_module_105 div.hikashop_category,#hikashop_category_information_module_105 div.hikashop_product{
	float:left;
}
#hikashop_category_information_module_105 .hikashop_subcontainer {
		 -moz-border-radius: 5px;
		-webkit-border-radius: 5px;
		-khtml-border-radius: 5px;
		border-radius: 5px;
}

			

#hikashop_category_information_module_99 div.hikashop_subcontainer {
	background:#FFFFFF;
}
#hikashop_category_information_module_99 .hikashop_rtop *,#hikashop_category_information_module_99 .hikashop_rbottom *{
	background:#FFFFFF;
}
			
#hikashop_category_information_module_99 div.hikashop_subcontainer,#hikashop_category_information_module_99 div.hikashop_subcontainer span {
	text-align:center;
}
#hikashop_category_information_module_99 div.hikashop_container {
	text-align:center;
}
			
#hikashop_category_information_module_99 div.hikashop_container {
	margin:10px 10px;
}
#hikashop_category_information_module_99 div.hikashop_category,#hikashop_category_information_module_99 div.hikashop_product{
	float:left;
}
#hikashop_category_information_module_99 .hikashop_subcontainer {
		 -moz-border-radius: 5px;
		-webkit-border-radius: 5px;
		-khtml-border-radius: 5px;
		border-radius: 5px;
}

			
  </style>

Can this this not be moved to a stylesheet in the same place the others are /media/com_hikashop/css ?

Please Log in or Create an account to join the conversation.

  • Posts: 13201
  • Thank you received: 2322
10 years 3 months ago #163619

Hi,

This kind of css is added dynamically, as you can see it is based on specific module id, so no by default we can't put it in a css file.

You can manually add it to the css file, but some php code will require to be edited in order to remove the add of this css.
But don't worry, having css in the header is secure, nobody can hack via css ;)

Please Log in or Create an account to join the conversation.

  • Posts: 259
  • Thank you received: 10
10 years 3 months ago #163714

no worries then if its generated on the fly. Know nobody can hack via css, the only thing it does is stylize elements

Please Log in or Create an account to join the conversation.

Time to create page: 0.070 seconds
Powered by Kunena Forum