Pixelpost

Authentic Photoblog Flavour


Go Back   Pixelpost Forum > DEVELOPMENT > Template design and Front-End Code

Post Reply
 
Thread Tools
  #1  
Old 12-23-2005, 08:08 PM
Sergio de la Torre Offline
pp veteran
 
Join Date: Oct 2005
Posts: 58
Center in CSS

I want to put a block in the middle of this page, but i dont know to do it.
http://www.sergiodelatorre.com/photo...hp?x=templates

I cant know what will be the height or width...

Help!
__________________
Reply With Quote
  #2  
Old 12-23-2005, 08:10 PM
blinking8s's Avatar
blinking8s+ Offline
über loafer
 
Join Date: Oct 2004
Location: Bowling Green, Ky
Posts: 3,428
Send a message via ICQ to blinking8s Send a message via AIM to blinking8s Send a message via MSN to blinking8s Send a message via Skype™ to blinking8s
there are height and width tags...check the doc/ folders tag list file

you use something like
div class="title" style="<IMAGE_WDITH>"

or something along those lines

height isnt something you can easily control, just by knowing the dimensions that safely fit, and how well your footer breaks when this is pushed out of the picture, or overlaps...
__________________
i should say more clever stuff
Reply With Quote
  #3  
Old 12-24-2005, 12:06 PM
Connie
Guest
 
Posts: n/a
Quote:
Originally Posted by Sergio de la Torre
I want to put a block in the middle of this page, but i dont know to do it.
<div align="center"> does not help?
Reply With Quote
  #4  
Old 12-24-2005, 01:06 PM
Sergio de la Torre Offline
pp veteran
 
Join Date: Oct 2005
Posts: 58
Vertical centering Horizontal is easy to do
__________________
Reply With Quote
  #5  
Old 12-24-2005, 01:14 PM
Connie
Guest
 
Posts: n/a
try CSS with:

margin-top:auto;margin-bottom:auto

that might help!
Reply With Quote
  #6  
Old 12-24-2005, 03:51 PM
blinking8s's Avatar
blinking8s+ Offline
über loafer
 
Join Date: Oct 2004
Location: Bowling Green, Ky
Posts: 3,428
Send a message via ICQ to blinking8s Send a message via AIM to blinking8s Send a message via MSN to blinking8s Send a message via Skype™ to blinking8s
just google it

'centering with css' or 'center content css' or something, you will find more than enough help
__________________
i should say more clever stuff
Reply With Quote
  #7  
Old 12-26-2005, 10:18 PM
Wearefive Offline
forum loafer
 
Join Date: Dec 2005
Location: London, UK
Posts: 3
Center box CSS

This will work for a centred box however is you need to virtically center the box as well you will need another approach. The outer container will be full width and the box 200px square. The text-align:left will correct the text-align:center inherited from the outer container.

<div id="container" style="text-align:center;">
<div id="box" style="width:200px;height:200px;text-align:left;">
[content]
</div>
</div>

Hope this helps.

Michael.
Reply With Quote
  #8  
Old 12-26-2005, 10:30 PM
Wearefive Offline
forum loafer
 
Join Date: Dec 2005
Location: London, UK
Posts: 3
Horizontal and Vertically Centred box model

This is the best and 100% cross platform horizontal and vertically centred box model I've found so far. Works with IE/WIN, FIREFOX/WIN, IE/MAC, FIREFOX/MAC, SAFARI/MAC... It even works on IE/Mac Classic (Mac OS 9).

-- START --

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>CSS - Vertically Centered Box</title>
<meta name="description" content="">
<meta name="keywords" content="">
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<style type="text/css">
body {
margin:0px;
}
#outerContainer {
position:relative;
height:50%;
border:solid #F00 1px;
}
#theBox {
position:absolute;
left:50%;
bottom:-25px;
width:100px;
height:50px;
border:solid #000 1px;
margin-left:-50px;
}
</style>
</head>
<body>

<div id="outerContainer">
<div id="theBox"></div>
</div>

</body>
</html>

-- END --
Reply With Quote
  #9  
Old 12-28-2005, 06:42 AM
GeoS's Avatar
GeoS+ Offline
Team Pixelpost
 
Join Date: Apr 2005
Location: Warsaw, Poland
Posts: 3,613
Send a message via ICQ to GeoS Send a message via Skype™ to GeoS
http://www.jakpsatweb.cz/css/css-ver...-solution.html
__________________
photoblog | portfolio | addons | Donate
Reply With Quote
  #10  
Old 12-28-2005, 11:37 AM
blinking8s's Avatar
blinking8s+ Offline
über loafer
 
Join Date: Oct 2004
Location: Bowling Green, Ky
Posts: 3,428
Send a message via ICQ to blinking8s Send a message via AIM to blinking8s Send a message via MSN to blinking8s Send a message via Skype™ to blinking8s
bet you i can figure out 31 flavours with google
__________________
i should say more clever stuff
Reply With Quote
Post Reply


Thread Tools




All times are GMT. The time now is 10:14 PM.

Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd. | Style Design: d3 designs