GetDotted Domains

Viewing Thread:
"CSS, Alligning an object right?"

The "Freeola Customer Forum" forum, which includes Retro Game Reviews, has been archived and is now read-only. You cannot post here or create a new thread or review on this forum.

Sat 29/05/04 at 16:14
Regular
"Digging!"
Posts: 1,560
Hey all,
I'm tying to get CSS to place a 2px line to the right side of the browser, but with no success.

#leftblack{
margin-top: 0px;
margin-left: 0px;
height: 100%;
width: 2px;
padding: 0px 0px 0px 0px;
background: #000000;
position: absolute;
}

The above code works to align a 2px line to the left side, so I assumed the following would align the line to the right, but it didn't.

#rightblack{
margin-top: 0px;
margin-right: 0px;
height: 100%;
width: 2px;
padding: 0px 0px 0px 0px;
background: #000000;
position: absolute;
}

I've tried using percentages for the left magin to align it right, but that doesn't work (depends on the size of the browser), so I'm not sure what to try now. Any ideas?

Cheers
S.A.

EDIT: Right, I've scrapped the border thingy, it effects the percentages to much. However, I still need to know how to align text vertically using CSS.
Sat 29/05/04 at 17:19
Regular
"Digging!"
Posts: 1,560
Nimco wrote:
> vertical-align: bottom;

Doesn't work.
Sat 29/05/04 at 17:07
Regular
"NULL"
Posts: 1,384
vertical-align: bottom;
Sat 29/05/04 at 17:07
Regular
Posts: 10,364
It's be easier for a visual representation of what you are doing.

Whats your website URL?
Sat 29/05/04 at 17:03
Regular
"Digging!"
Posts: 1,560
Also, how do I align texts vertical position in an element, I want it at the base.
Sat 29/05/04 at 17:02
Regular
"Digging!"
Posts: 1,560
Nimco wrote:
> Unless I'm missing something, those two pieces of code are identical
> except for the name of the class.

Look again. One has the margin-right as 0px rather than the margin-left, which doesn't work.
Sat 29/05/04 at 16:42
Regular
"NULL"
Posts: 1,384
Unless I'm missing something, those two pieces of code are identical except for the name of the class. I'm a bit out of practise with coding at the moment - long time, no use - but I believe you can do it using the text-align property or right property, e.g.

text-align: right;

or

right: 0px;

With the latter method, you can increase the value to move it away from the edge, so if you want the line to be 10 pixels from the edge of the page, you could use:

right: 10px;
Sat 29/05/04 at 16:14
Regular
"Digging!"
Posts: 1,560
Hey all,
I'm tying to get CSS to place a 2px line to the right side of the browser, but with no success.

#leftblack{
margin-top: 0px;
margin-left: 0px;
height: 100%;
width: 2px;
padding: 0px 0px 0px 0px;
background: #000000;
position: absolute;
}

The above code works to align a 2px line to the left side, so I assumed the following would align the line to the right, but it didn't.

#rightblack{
margin-top: 0px;
margin-right: 0px;
height: 100%;
width: 2px;
padding: 0px 0px 0px 0px;
background: #000000;
position: absolute;
}

I've tried using percentages for the left magin to align it right, but that doesn't work (depends on the size of the browser), so I'm not sure what to try now. Any ideas?

Cheers
S.A.

EDIT: Right, I've scrapped the border thingy, it effects the percentages to much. However, I still need to know how to align text vertically using CSS.

Freeola & GetDotted are rated 5 Stars

Check out some of our customer reviews below:

Simple, yet effective...
This is perfect, so simple yet effective, couldnt believe that I could build a web site, have alrealdy recommended you to friends. Brilliant.
Con
Second to none...
So far the services you provide are second to none. Keep up the good work.
Andy

View More Reviews

Need some help? Give us a call on 01376 55 60 60

Go to Support Centre
Feedback Close Feedback

It appears you are using an old browser, as such, some parts of the Freeola and Getdotted site will not work as intended. Using the latest version of your browser, or another browser such as Google Chrome, Mozilla Firefox, or Opera will provide a better, safer browsing experience for you.