/    Sign up×
Community /Pin to ProfileBookmark

"padding-right" padding doesn’t work in div

Is there some easy way to set a r.h. text margin?

I have a series of div containers (leftmain, centermain, rightmain) and for some reason when I try to set padding in the leftmain div container (to add padding to the r.h. side of that container), it doesn’t work. My page validates using Firefox local validation but doesn’t render correctly. Instead, the text from that container simply spills over and is hidden under the “rightmain” div container.

The site is
[url]http://www.L17arts.com/testindex.html[/url]

Also, for some reason (perhaps related??) when I tried to float left a picture in the leftmain div container using this tag:

[CODE]<img src=”images/celebrate_america_star1.jpg” width=”188″ height=”171″ alt=”celebrate” />[/CODE]

I cannot get the text to align at the top of the image.

to post a comment
CSS

1 Comments(s)

Copy linkTweet thisAlerts:
@FangMay 03.2010 — It's because you are using positioning on the containers.

Move all containers to the right of [I]leftmain[/I] by the amount of the required padding.
×

Success!

Help @lindagal2 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.18,
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,
)...