This is a discussion on "[SOLVED] Content" within the Web Page Design section. This forum, and the thread "[SOLVED] Content are both part of the Design Your Website category.
|
|
|
|
|
![]() |
||
[SOLVED] Content
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
#1
|
|||
|
|||
|
[SOLVED] Content
How do I center all my content using css as appose to using a table?
|
|
|
|
#2
|
|||
|
|||
|
Re: Content
Well, your sample code will be helpful!
Do you want to center the element itself (your div) or the element inside the div (eg. your <h1> or <p>)?
Last Blog Entry: ASP Programming Tips and Technique (Oct 26th, 2007)
|
|
#3
|
||||
|
||||
|
Re: Content
try something like:
And your html would be:
Last Blog Entry: 3D Chess in your browser! (Mar 14th, 2008)
|
|
#4
|
|||
|
|||
|
Re: Content
That would be positioning the div horizontally center.
If you want to center the elements inside the div, you would use:
Last Blog Entry: ASP Programming Tips and Technique (Oct 26th, 2007)
|
|
#5
|
|||
|
|||
|
Re: Content
If you want to center your content horizontal and vertically, you can use a wrapper div.
Using fixed pixel values, you can do it this way:
|
|
#6
|
||||
|
||||
|
Re: Content
Monie it will not center all elements, just text.
And personally center aligned text is awful looking, I wouldn't use it!
Last Blog Entry: 3D Chess in your browser! (Mar 14th, 2008)
|
|
#7
|
|||
|
|||
|
Re: Content
yeap.. It depends on what thewebkid means "content" in his question.
Thanks for clearing that up. If he got image inside the div, he would just have to put this in his css code:
Last Blog Entry: ASP Programming Tips and Technique (Oct 26th, 2007)
|
|
#8
|
|||
|
|||
|
Re: Content
OK sorry for the lack of information I have given you. I will draw you out what I want the basic layout of my website to look like. It's like that "holy grail thing" I just learned a little of CSS in my class and not enough to know how to layout a page. brb with the image
|
|
#9
|
|||
|
|||
|
Re: Content
Quote:
Most websites don't need three columns. Use two columns unless you have a very good reason for three. Since you're new to CSS, don't attempt complicated layouts. Most of them are pointless anyway, and you'll only confuse yourself. |
|
#10
|
|||
|
|||
|
Re: Content
Then What should I do? I don't want a beginner looking website.(that seems pretty prideful) I want to make i appealing and make it look like I really work hard on it.
......Ok now I am going to be more specific. This here shows the type of layout I want. I can do this with tables, but we all know that's a big RED LIGHT when it comes to web design. I want to be able to apply this to all my web pages(obviously) and have just a plain background color which I will chose later. Thank you for your help. |
|
#11
|
|||
|
|||
|
Re: Content
See the August editions of the Newsletter ... I have touched this in the FAQ
How do I center my site horizontally? |
|
#12
|
||||
|
||||
|
Re: Content
put all of the divs inside a master div and use my first code.
e.g. The CSS:
The html:
Last Blog Entry: 3D Chess in your browser! (Mar 14th, 2008)
|
|
#13
|
||||
|
||||
|
Re: Content
From your example to get the div to strech down the page on everyone's screens you will need to kinda hack it.
I found Ryan Fait's (was a webforumz member but isnt as active now!) sticky footer a good example. It can be found here: http://ryanfait.com/sticky-footer/. Also to center the div you use the margin:0 auto; code
__________________
Marc Staff Manager - Webforumz.com Want to be a moderator? PM me. |
|
#14
|
|||
|
|||
|
Re: Content
Guys ... stop repeating yourselves!
|
|
#15
|
||||
|
||||
|
Re: Content
Ha yeah, seems like everyone has to clarify what everyone else says..
And I now realise by saying this I'm being a hypocrite..
Last Blog Entry: 3D Chess in your browser! (Mar 14th, 2008)
|
|
#16
|
|||
|
|||
|
Re: Content
Have I stirred up trouble?
|
|
#17
|
|||
|
|||
|
Re: Content
Not really but next time it would help if you'd be more specific in your opening post!
But then ... the members here are trigger happy and can't wait to help out without even knowing what the OP needs help with |
|
#18
|
|||
|
|||
|
Re: Content
lol sorry. I was in a rush and wanted to get the subject going before calling it a day.
|
|
#19
|
||||
|
||||
|
Re: Content
Anyway, did any of the suggestions work?
Or do you need more help?
Last Blog Entry: 3D Chess in your browser! (Mar 14th, 2008)
|
|
#20
|