/    Sign up×
Community /Pin to ProfileBookmark

Images & CSS – Resizing window makes it messy

Hi,

I have a banner for a webpage within a container. code is below:

body {
font-size: 75%;
font-family:Verdana, Arial, Helvetica, sans-serif;
background-color:#E8E8E8;
padding: 25px 139px 25px 139px;
color:#464646;
}

.banner {
background: #888995 url(image.gif);
background-repeat:no-repeat;
width:100%;
height:120px;
background-position: 0% 100%;
float:right;
padding:0px;
border-bottom:1px solid #AAAAAA;
}

.box {
background-color: #FFF;
border: 1px solid #AAAAAA;
}

HTML CODE
————-

<div class=”banner”></div> <!– within box div –>


—————

When window is resized, the image is just cutoff and looks really messy.
Has anyone any ideas on how to get around this?

I have tried specifying the width of the image in pixels…

Thanks for any tips

to post a comment
CSS

2 Comments(s)

Copy linkTweet thisAlerts:
@drhowarddrfineJun 29.2005 — The problem is you are sizing the div in percent but not the image. So the image doesn't resize when the div does. I assume you want the resize to stop when it shrinks to the size of the image? Let me think cause the brain is fried today.
Copy linkTweet thisAlerts:
@toicontienJun 29.2005 — Add min-width: [size of your banner]px; to the .banner declaration.
×

Success!

Help @noodles9999 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.21,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...