Name.com Cyber Monday sale: $6.99 .com domains and more. Shop the sale.

DIV positioning

SpaceshipSpaceship
SpaceshipSpaceship
SpaceshipSpaceship
Watch

tsalexey544

Account Suspended
Impact
0
DIV positioning

--------------------------------------------------------------------------------

I've got a div with a colored background and a fixed width and I'm trying to get it centered on the page. However the align property in the div tag doesn't work if I'm using an ID. I've gotten the alignment to work with nesting but then the width of the box gets disregarded. Basically what I want is, say, a 200px wide box with an ID centered on the screen. Any help would be greatly appreciated. I hope I've explained this well enough for someone to understand what I'm asking
 
0
Close
The views expressed on this page by users and staff are their own, not those of NamePros.
GoDaddyGoDaddy
I believe this text answers your question. Let me know if it doesn't.
 
0
Close
you can also use...............
<div id="id" style="position:absolute; width:200px; height:24px; z-index:1;
<p>
your text
</p>
</div>

this will allow you to position your div anywhere on your page that you like.
 
0
Close
CatchedCatched

We're social

Escrow.com
Spaceship
Domain Recover
CryptoExchange.com

NamePros updates

New: watch any domain
You can now watch domains on NamePros. We check each one and notify you when something changes. Search for a domain and press Watch on...
AIVikings
Catchy
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back