Block size question

Posted in: Newspaper
Post count: 20

Hello.

https://imgur.com/a/QmIXp

So, I add some borders and background on my blocks to look cooler and I want another thing. In down post I use paddig but when i add more words to title whole block became bigger.

I want to have fixed layout and predefined block size like down photo on my picture, but I dont want to use excerpts.

I want to prevent that smaller headline pull whole article bottom color up.

https://imgur.com/a/VSVZ5 this link is from The Guardian and explains what I want, so, blocks of the same size but that title size doesnt affect on that block size or push my posts down and broke layout. How can I achieve that?

It also can be solved by adding automatic font resize when title become too big for fit inside block, how can I do that?

  • This topic was modified 8 years by Prokhorov.
  • This topic was modified 8 years by Prokhorov.
Post count: 20

Lets simplify this:

https://imgur.com/a/Pmo4d

I want to have a block size equal to red marker lines, but I want that title resize itself according to size of words to fit inside it and doesnt change layot

Post count: 20688

Hi,

Basically you want to achieve something like the modules in the Latest articles, in the Business demo
https://www.screencast.com/t/jOZWM0o2D55Z
Those modules have custom design, there is a minimum height set for the module title, and also a shadow like this
https://www.screencast.com/t/z66Sis4nClI
This is the code for that

.td_module_wrap.td_module_1 .entry-title {
margin: 0 20px 50px 20px;
min-height: 80px;
}
.td_module_wrap.td_module_1 {
margin-bottom: 40px;
-webkit-box-shadow: 0 0 1px rgba(79,172,234,.4);
-moz-box-shadow: 0 0 1px rgba(79,172,234,.4);
box-shadow: 0 0 1px rgba(79,172,234,.4);
}

It will apply to all module 1 (you can experiment with other modules), it can be made more specific by specifying the block as well in the code
https://www.screencast.com/t/KGHlX5W0
Or even more specific by setting a custom class for the block
https://www.screencast.com/t/TNezURxtBv

Thanks

Post count: 20

Thanks, I have one more question.

If i want to set fixed shadow bellow the box, lets say 50px, can I have that shadow then post lenght is 5 words and when post lenght is 20 words. Let’s say 25 works are excerpt limit before three dots appear, can I have my box with same size when it has 5 or 15 words?

  • This reply was modified 8 years by Prokhorov.
Post count: 20688

Hi,

By setting a minimum size for the module like in the code provided above, the module size and shadow will always be the same size, given a shorter or longer title. You could increase the minimum height value if you want to display longer excerpts
https://www.screencast.com/t/AVT2FIzxMd8

Thanks

Viewing 5 posts - 1 through 5 (of 5 total)
The forum ‘Newspaper’ is closed to new topics and replies.