|
|
Centering A Div - without having to center the content in it | ||
Discussion by MediYama with 19 Replies.
Last Update: September 6, 2007, 9:16 pm (View Latest) | Page 1 of 2 pages. | ||
MediYama
Sun Jul 15, 2007 Reply New Discussion
"nice share" u arent even reading wot ppl write sirat.
i have my whole site centered just with center tags.
but, everything else is in table inside tables inside tables so it doesnt affect them.
but, if u want to center your site like that, u could use margins? the same on both side.
Sun Jul 15, 2007 Reply New Discussion
I want the site to be centered (the background, the boxes) but the text to just be slammed to the left side.
Sun Jul 15, 2007 Reply New Discussion
it will put it all in the middle if you make the left and right margins the same.
Sun Jul 15, 2007 Reply New Discussion
Edit: It does what it's supposed to do, but it makes a problem with different resolutions... Any other solution?
Another edit: Solved my problem, thanks anyway!
Sun Jul 15, 2007 Reply New Discussion
An example would be:
CODE
<div id="content" style="width: 745px; margin-left: auto; margin-right: auto;">the content here</div>So if centering your site, you would put your website inside of that.
Hope this helps, if it doesn't I would recommend posting a link to either your website, or an example of an attempt at what you are doing, so we can take a look at the code, and provide more specific help.
Sun Jul 15, 2007 Reply New Discussion
QUOTE (MediYama)
I'm now rebuilding my website, and I have come against a problem of which I don't know how to fix it. I am using div tags (of course) but what I want to know is how to center the site, without having the text layout centered. Does anyone know how? I have not found any solutions yet. Thanks in advance.MediYama
Link: view Post: 107498
If you want to center horizontally your div or any other block element you can use achieve this with:
CODE
<div style="width:10em;margin:0 auto">div content</div>Best regards,
Mon Jul 16, 2007 Reply New Discussion
Mon Jul 16, 2007 Reply New Discussion
margins dont work too well in other resolutions. i had that problem once when i was making a website for school for an assignment or something.
anyway, u fixed it and thats wot counts
Mon Jul 16, 2007 Reply New Discussion
Mon Jul 16, 2007 Reply New Discussion
Tue Jul 17, 2007 Reply New Discussion
its really annoying, especially on my site, i have about 10 tables inside eachother just to make it work in internet explorer.
Firefox actually like knows what people want (well the rendering engine does anyway) but internet explorer... doesnt.
Tue Jul 17, 2007 Reply New Discussion
QUOTE (Sten)
One thing i REALLY hate is hoe everything works in firefox but not internet explorer.its really annoying, especially on my site, i have about 10 tables inside eachother just to make it work in internet explorer.
Firefox actually like knows what people want (well the rendering engine does anyway) but internet explorer... doesnt.
Link: view Post: 107669
It is because internet explorer do not support completely the W3C standards as the others browsers do, as far i know the browser that supports almost completely the standards is Opera following by the Gecko browsers like Firefox.
Best regards,
Tue Jul 17, 2007 Reply New Discussion
Thu Jul 19, 2007 Reply New Discussion
some things dont work on it. the main problem i found is that with multiple iframes on the site, even if you use names and target a link to a particular iframe, it will just show it in the first iframe on the site.
thats wot i hate about opera.
Thu Jul 19, 2007 Reply New Discussion
Stretching My Site Vertically Using CSS or HTML (6)
|
(3) Change The Look Of Your Myspace Page
|
Index




