| 
			
			 | 
		#1 | 
| 
			
			
			
			 Member 
			
			![]() Posts: 10 
				Karma: 10 
				Join Date: Jan 2011 
				
				
				
				Device: none 
				
				
				 | 
	
	
	
		
		
			
			 
				
				How do I centralize the box?
			 
			
			
			I want to put the colored box in the center, but I've tried several css that don't seem to work. How do I put it in the central position instead of in the current left position?
		 
		
	
		
		
			 | 
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#2 | |
| 
			
			
			
			 Well trained by Cats 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 31,267 
				Karma: 61916422 
				Join Date: Aug 2009 
				Location: The Central Coast of California 
				
				
				Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A 
				
				
				 | 
	
	
	
		
		
		
		
		 Quote: 
	
 to fake centering , care needs to be taken that the box will always fit the display width (ADE has issues with auto margins, so be forewarned)  | 
|
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#3 | 
| 
			
			
			
			 Wizard 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,520 
				Karma: 121692313 
				Join Date: Oct 2009 
				Location: Heemskerk, NL 
				
				
				Device: PRS-T1, Kobo Touch, Kobo Aura 
				
				
				 | 
	
	
	
		
		
		
		
		 
			
			You might try a table. It is not nice, but it will probably work.
		 
		
	
		
		
		
		
		
		
		
		
		
		
	
	 | 
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#4 | 
| 
			
			
			
			 Zealot 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 121 
				Karma: 5070 
				Join Date: Dec 2010 
				
				
				
				Device: none 
				
				
				 | 
	
	
	
		
		
		
		
		 
			
			May i ask what this have to do with Sigil? Thats HTML or ePub where we have a special forum for.
		 
		
	
		
		
		
		
		
		
		
		
		
		
	
	 | 
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#5 | 
| 
			
			
			
			 Well trained by Cats 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 31,267 
				Karma: 61916422 
				Join Date: Aug 2009 
				Location: The Central Coast of California 
				
				
				Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A 
				
				
				 | 
	
	|
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#6 | |
| 
			
			
			
			 Berti 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,197 
				Karma: 4985964 
				Join Date: Jan 2012 
				Location: Zischebattem 
				
				
				Device: Acer Lumiread 
				
				
				 | 
	
	
	
		
		
		
		
		 Quote: 
	
 IMO it's not possible to find a solution with paragraph or table formatting which is perfect everywhere. Table-fomatting: Code: 
	table    { margin: 1em auto }
td { border: 1px solid black; text-align: center; width: 200px }
With paragraph-formatting it will be a bit difficult to keep the box at the same size, if the screen size changes. So i got a third suggestion: make a image.  | 
|
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#7 | 
| 
			
			
			
			 Guru 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 657 
				Karma: 64171 
				Join Date: Sep 2010 
				Location: Kent, England, Sol 3, ZZ9 plural Z Alpha 
				
				
				Device: Sony PRS-300, Kobo Aura HD, iPad (Marvin) 
				
				
				 | 
	
	
	
		
		
		
		
		 
			
			If the box can be defined width as a % of display width, then the left margin coluld be 100%-BoxWidth% divided by 2, so if BoxWidth=70% then left margin would be 15%
		 
		
	
		
		
		
		
		
		
		
		
		
		
	
	 | 
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#8 | |
| 
			
			
			
			 eBook FANatic 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 18,301 
				Karma: 16078357 
				Join Date: Apr 2008 
				Location: Alabama, USA 
				
				
				Device: HP ipac RX5915 Wife's Kindle 
				
				
				 | 
	
	
	
		
		
		
		
		 Quote: 
	
 Code: 
	.centerbox{
width:50%;
padding:10px;
border:3px solid black;
margin-left:auto;
margin-right:auto;
margin-bottom:1em;
}
You can adjust as needed. Last edited by crutledge; 03-13-2012 at 04:30 PM. Reason: Sorry about the double post.  | 
|
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#9 | |
| 
			
			
			
			 Well trained by Cats 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 31,267 
				Karma: 61916422 
				Join Date: Aug 2009 
				Location: The Central Coast of California 
				
				
				Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A 
				
				
				 | 
	
	
	
		
		
		
		
		 Quote: 
	
 Use the formula above  | 
|
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#10 | 
| 
			
			
			
			 eBook Enthusiast 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 85,560 
				Karma: 93980341 
				Join Date: Nov 2006 
				Location: UK 
				
				
				Device: Kindle Oasis 2, iPad Pro 10.5", iPhone 6 
				
				
				 | 
	
	
	
		
		
		
		
		 
			
			This will probably have the HTML purists beating their heads against the wall in horror, but the "depracated-but-still-supported-by-all-devices" <center> tag is jolly useful for this kind of thing.
		 
		
	
		
		
		
		
		
		
		
		
		
		
	
	 | 
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#11 | |
| 
			
			
			
			 Berti 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,197 
				Karma: 4985964 
				Join Date: Jan 2012 
				Location: Zischebattem 
				
				
				Device: Acer Lumiread 
				
				
				 | 
	
	
	
		
		
		
		
		 Quote: 
	
 Sigil transforms the "<center>" to an "sgc-1 {text-align: center}" without hesitation. "<center>" ist html-transitional only, so i won't assume, that it will be supportet by all devices.  | 
|
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#12 | |
| 
			
			
			
			 Member 
			
			![]() Posts: 10 
				Karma: 10 
				Join Date: Jan 2011 
				
				
				
				Device: none 
				
				
				 | 
	
	
	
		
		
		
		
		 Quote: 
	
 WOW!!! There are so many replies!!! A great thank to all of you. I will give it a try on the suggestions all of you have put here. Thanks to you all!  | 
|
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#13 | 
| 
			
			
			
			 Enthusiast 
			
			![]() Posts: 31 
				Karma: 10 
				Join Date: Aug 2012 
				
				
				
				Device: Kindle 
				
				
				 | 
	
	
	
		
		
		
		
		 
			
			This was a huge help to me today. Karma all around; thank you.
		 
		
	
		
		
		
		
		
		
		
		
		
		
	
	 | 
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
![]()  | 
            
        
    
            
  | 
    
			 
			Similar Threads
		 | 
	||||
| Thread | Thread Starter | Forum | Replies | Last Post | 
| Text in a box? | Skeezix | Kindle Formats | 3 | 01-23-2012 08:22 AM | 
| Thinking 'outside the box'...new uses... | Reader Paradice | Kobo Tablets | 20 | 12-01-2011 07:42 PM | 
| $119.99 PE New in Box | Emptora | enTourage eDGe | 4 | 08-17-2011 03:14 PM | 
| Sell Smart Q7, w/ box etc. | rogue_ronin | Flea Market | 0 | 12-17-2009 07:46 PM | 
| Kindle out of the box | aconfrere | Introduce Yourself | 3 | 01-18-2008 08:02 PM |