Avatar of itnifl
itnifl
Flag for Norway asked on

CSS make everything within a div smaller then originally intended

Is there a way to make everything within a div a certain percentage smaller then it would be if the div was not there? I was thinking maybe with a CSS class or something in that direction. With this I mean that if a height and width is originally 100 on tables and images and son on, then it is  auitomatically reduced to 70 next time the page loads if I insert the div there with serverside scripting. I am trying to avoid rewriting all the heights and widths, I just want to downsize them by 30% in this example, all together.
CSSHTMLWeb Development

Avatar of undefined
Last Comment
Ess Kay

8/22/2022 - Mon
IanTh

Ess Kay

if you have the items already connected to a class you can do the following

substitute the code inside the css for what yu want it to accomplish : ie: height, width


CSS sheet:


.area1
{
        border:1px solid black;
}
.area1 .item
{
    color:red;
}
.area2
{
    border:1px solid blue;
}
.area2 .item
{
    color:blue;
}




HTML

<div class="area1">
    <table>
        <tr>
                <td class="item">Text Text Text</td>
                <td class="item">Text Text Text</td>
        </tr>
    </table>
</div>
<div class="area2">
    <table>
        <tr>
                <td class="item">Text Text Text</td>
                <td class="item">Text Text Text</td>
        </tr>
    </table>
</div>
itnifl

ASKER
None of this is actually what I was looking for. I was looking for a way to wrap an area of a html page and resize it smaller then originall. Thus resizing by a percentage of what is coded there from before.
This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.
rwheeler23
SOLUTION
Robert Schutt

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
ASKER CERTIFIED SOLUTION
Log in to continue reading
Log In
Sign up - Free for 7 days
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.
SOLUTION
Log in to continue reading
Log In
Sign up - Free for 7 days
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.