/    Sign up×
Community /Pin to ProfileBookmark

How can I positon layers?

Hi,

Have a problem. How can I set layers in the middle of a page or related to the page?
Use also tables on the same page a that no problem with the allign option. So, my question is: how can I set layers on a position that variable is to the page properties? Have tryed to set a xx% (percent)but that don’t works.

Thanks.

to post a comment
CSS

7 Comments(s)

Copy linkTweet thisAlerts:
@FangSep 13.2004 — This is how to center a layer:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
<title>center contents</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style type="text/css">
<!--
body {text-align: center}
#alignment {text-align: left; margin: auto auto; width:60%;}
p {background:red;}
-->
</style>

</head>
<body>
<div id="alignment">
<p>contents</p>
</div>
</body>
</html>

You can use relative and/or absolute positioning, http://www.w3schools.com/css/pr_class_position.asp
Copy linkTweet thisAlerts:
@JohanvhauthorSep 13.2004 — Thanks for your reply, but...

This can I use to center the layer exactly in the center. What if I want the layer for example at 1/3 on the left?

Thanks.
Copy linkTweet thisAlerts:
@FangSep 13.2004 — position:relative; left:33%;
Copy linkTweet thisAlerts:
@JohanvhauthorSep 13.2004 — Thanks for your reply but...

It don't works. I have tryed several things but without a good result. Where do I have to set the 'position:relative; left:33%;'

I have a layer with fixed dimensions and I want it positioned at 1/3 from the left of the page.

Thanks for your help.

I think the last time (for this problem) ;-)
Copy linkTweet thisAlerts:
@JohanvhauthorSep 14.2004 — Please, can someone help me with this problem.

Thanks a lot !
Copy linkTweet thisAlerts:
@Stephen_PhilbinSep 14.2004 — position:relative; left:33%;

is a css statement. You need to put it in a css file and then link to it. Or you could put it in a style block in the head of your document, or you could just throw it in as inline style statements.

Go and read up on css at http://www.w3schools.com/css/default.asp .

it should give you plenty of ideas and make your coding life MUCH easier. ?
Copy linkTweet thisAlerts:
@FangSep 14.2004 — If you are still having problems than shw us you page.
×

Success!

Help @Johanvh 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.19,
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,
)...