Jump to content

Maths in CSS?


LemonInflux

Recommended Posts

I'm designing a website in CSS, and have one div layer within another div layer. I want the one in the middle to be 20px shorter than the other.

 

Can this be achieved?

 

Can I do something like width:100%-20px;?

 

Thanks in advance,

 

Tom

 

Not in Css. YOu would either have to use php to parse the css code differently for each user, OR use javascript to dynamically change both. Either solution doesn't work 100% and isn't worth the time to put in.

Link to comment
https://forums.phpfreaks.com/topic/92714-maths-in-css/#findComment-475288
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.