× Discussion about "Rockin" Joomla template.

Topic-icon Is it Possible to Change Width to Percentage % ?

More
7 years 2 months ago #5872 by tenoch
Hi
I want to modify css files, to make Width 98%, and not in pixels

Is it possible?
How can I do this?

Thanks

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

More
7 years 2 months ago - 7 years 2 months ago #5873 by pirossi
The easiest way for that is to edit templates\hot_rockin\css\template_css.php and add these two lines:
margin-left: 1% !important;
margin-right: 1% !important;
inside body to look like this:
body  {
	color:<?php echo $bodyText; ?>;
	margin-left: 1% !important;
	margin-right: 1% !important;
}

You can experiment with the values.
Last edit: 7 years 2 months ago by pirossi.

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

More
7 years 2 months ago #5875 by tenoch
Hi

I tried it, but it did not worked

This only added a margin of 1% on each side, but main content still does have the pixel width restriction that the template have in Adminstration


Thanks
Regards

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

More
7 years 2 months ago #5876 by tenoch
ok
I found how to do it

I Replaced this:
.wrapper,.footer_wrap,.main_area {
	width:<?php echo $templateWidth; ?>px;
}

<?php
$bottomWidth = $templateWidth + 16;
?>

.bottom {
	width:<?php echo $bottomWidth; ?>px;
}

<?php
$pathWidth = $templateWidth - 230 - 468;
?>

.path {
	width:<?php echo $pathWidth; ?>px;
}

#content_wrap {
	width:<?php echo $contentWidth; ?>px;
}

With this:
.wrapper,.footer_wrap,.main_area {
	width:<?php echo $templateWidth; ?>%;
}

<?php
$bottomWidth = $templateWidth;
?>

.bottom {
	width:<?php echo $bottomWidth; ?>%;
}

<?php
$pathWidth = $templateWidth - 230 - 468;
?>

.path {
	width:<?php echo $pathWidth; ?>px;
}

#content_wrap {
	width:<?php echo $contentWidth; ?>%;
}

Regards

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

Time to create page: 0.128 seconds