Unstoppable Domains — Get your daily AI drops report

DIV positioning

Namecheap AuctionsNamecheap Auctions
Namecheap AuctionsNamecheap Auctions
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
•••
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
•••
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
•••
CatchedCatched

We're social

Escrow.com
Spaceship
Rexus Domain
CryptoExchange.com
Domain Recover
CatchDoms
DomDB
NameFit
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back