.NET Framework - Want to "center" the page in the browser but let the text flow?
Asked By Tom Miller
17-Nov-09 04:00 PM
Folks,
I would like to have the page show up in the middle of the browser window.
I would like the background to "border around the displayed page." I would
like the page proper to stand out by being another color. For instance, the
basic background of the "border" might be white but the page in the center
might be a pure black background.
Here is the URL I am trying to convert into CSS. http://www.ChatNFiles.com
Here is a URL that has something like what I am shooting for:
http://JewlerybyJulie.ChatNFiles.com But it is tables-based.
Is this even possible?
Tom
--
Who me? What signature?
I manage design and acquistion of data-driven websites at:
http://BlueCollar.ChatNFiles.com
Linkedin Profile: http://www.linkedin.com/in/tlgalenson
www.ChatNFiles.com has telnet chatting and more than 500,000 downloads
Tahoma
(1)
Greg
(1)
Mirandabelieve
(1)
Tlgalenson
(1)
Devolopers
(1)
W3schools
(1)
Wholepage
(1)
Selector
(1)
Cheryl D Wise replied to Tom Miller
To center content in the middle of a page requires three things:
1. A valid doctype
2. A container with a defined width (div preferred by can be a table
specified in pixels, percents or ems)
3. Applied CSS selector with margin-left: auto; margin-right: auto.
Example:
width: 780px;
margin: 0 auto;
}
BTW, please do not cross post to newsgroups that are on different servers.
Not being subscribed to whatever css newsgroup you had in your cross posting
made it difficult to respond.
--
Cheryl D Wise
http://by-expression.com
Tom Miller replied to Cheryl D Wise
Tom Miller replied to Cheryl D Wise
But, but, but..... They both are on my news server... but it had not
occurred to me that if I were trying to read this from say the microsoft
news server it would come back and byte me.
Sorry.
Tom
--
Who me? What signature?
I manage design and acquistion of data-driven websites at:
http://BlueCollar.ChatNFiles.com
Linkedin Profile: http://www.linkedin.com/in/tlgalenson
www.ChatNFiles.com has telnet chatting and more than 500,000 downloads
Tom Miller replied to Cheryl D Wise
Sorry, my mind is slower than light (make that mud) this afternoon.
That takes care of the positioning. My follow on question is how do I get
the background of the "container" to display "over the top" of the
background color command for the ?
Its making my head scratch.
Thanks,
Tom
Tom Miller replied to Tom Miller
That appears to work in the following. Setup the background color in the
Like this:
body {
margin: 0;
padding: 0;
font-family: Tahoma;
font-size: 11px;
background-color: white;
color: #EAF5FF;
Then use the
width: 780px;
margin: 0 auto;
background-color: black;
}
trick. It sets up your page in the middle of the browser window with a
white border around the page! Just what I was shooting for.
So now I have everything but the question of letting the text flow and
here it STILL looks VERY nice!
Thank you Cheryl!
Tom
--
Who me? What signature?
I manage design and acquistion of data-driven websites at:
http://BlueCollar.ChatNFiles.com
Linkedin Profile: http://www.linkedin.com/in/tlgalenson
www.ChatNFiles.com has telnet chatting and more than 500,000 downloads
Cheryl D Wise replied to Tom Miller
As you discovered adding a background to the container divs does what you
want. Think of it as layering, parts that are not covered show.
Most of this is covered in the free self paced material at
http://w3schools.com in then css material especially when you combine it
with the html material. I also cover some of A in the Basic website Tutorial
and other tutorials in the site shown in my signature.
--
Cheryl D Wise
http://by-expression.com
Gregory A. Beamer replied to Tom Miller
@newsfe10.iad:
Most provider news servers are aggregates. Anything that is not microsoft.
will not appear here. It is not a huge issue, to me at least, but
newsreaders throw errors when you try to cross post back and do not have
access. ;-)
Peace and Grace,
Greg
--
Vote for Miranda's Christmas Story
http://tinyurl.com/mirandabelieve
Twitter: @gbworld
Blog: http://gregorybeamer.spaces.live.com
*******************************************
| Think outside the box! |
*******************************************
Tom Miller replied to Cheryl D Wise
I have been working through the CSS at w3schools but apparently I am going to
have to go back to the html tutorial too.
A devolopers learning curve is never done <sigh>.
Tom
--
Who me? What signature?
I manage design and acquistion of data-driven websites at:
http://BlueCollar.ChatNFiles.com
Linkedin Profile: http://www.linkedin.com/in/tlgalenson
www.ChatNFiles.com has telnet chatting and more than 500,000 downloads
within a DataSet ? / / Tony C# Discussions ASP.NET (1) TableAdapter (1) DataTables (1) DataSet (1) Greg (1) Mirandabelieve (1) Adapters (1) Gbworld (1) http: / / msdn.microsoft.com / en-us / library / system.data.dataset TableAdapter for the DataSet as a whole, if that is your question. Peace and Grace, Greg - - Vote for Miranda's Christmas Story http: / / tinyurl.com / mirandabelieve Twitter: @gbworld Blog: http: / / gregorybeamer.spaces.live.com * ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** | Think outside the box! | * ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** keywords: About, a
needs to use this WS. What steps need I to take? Thanks for any hint Greg - - Greg Jimson ASP.NET Web Services Discussions Visual Studio 2005 (1) Visual Studio (1) WPF (1 Web Reference just having the WSDL file and the proxy class? Thanks for any advice Greg Use "Add Service Reference", available in VS 2008. Or use VS 2005 + "Visual Studio 2005
appropriate program opens with the pdf file showing. Any help would be greatly appreciated. Thanks. - - Greg Expression Interactive Designer Discussions VB.NET (1) Expression Blend (1) MSFT (1) GregD (1) RichTextBox (1) TextBlock (1) CD (1) Silverlight (1) Greg, Do you know the absolute paths of the PDFs? If so, then use http: / / link to the files on the CD. What's the best way to do that? Thanks - - Greg Greg, To create the hyperlink: 1. From within Blend, press F1 or go to Help > User the Beta version. When I click on the Index tab, it simply states "Coming Soon". - - Greg Greg, We have more current downloads available. Free trial of the release version of Microsoft Expression newsgroup purposes only. Awesome! Thanks man, I am downloading the new version as I type. - - Greg Sorry, quick question. What's the best way to link a button to a file that when the button is clicked a file (pdf, jpg, doc, etc.) is opened? Thanks. - - Greg Greg, The best way is to have Visual Studio installed with Blend. Draw your button
Text box size .NET Framework Hi I am using Tahoma 8 size for my text boxes which is changed to Tahoma, 8.25pt by the system. The height of my text boxes is 21 with this VB.NET (1) Visual (1) Subscribe (1) Remove (1) Ramuseco (1) Windows (1) Tohama (1) Tahoma (1) I'm surprised. I have lots of textboxes with this font size that have to Microsoft Sans Serif, Regular does change the height to 20 but I am using Tahoma 8 which becomes Tohama 8.25 when saved and keeps the text box height at and never miss a new article. keywords: Text, box, size description: Hi I am using Tahoma 8 size for my text boxes which is changed to Tahoma, 8.25pt by the system. The height of my text boxes is 21 with this