Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
Thread: html and css width problem
04-10-2012, 08:35 AM #1
- Join Date
- Apr 2012
- Thanked 0 Times in 0 Posts
html and css width problem
Look at this website.
It has a width problem. Look at the horizantal scrolling. I want to remove that scrolling and fix the width of the site but I am not able to do so. I tried and theCode:
second When I hover the mouse over the last navigation menu item(Pigoen forge) the menu appears but note the horizontal scroll bar, when the menu appears the width of the site increases and the items of the menu appears on the right side which are hidden from the browser window. SO how will I fix it? If the browser window finished then it must display the menu items on the left side.
Please help me out from these two problems. I tried and spent a lot of time on these issues but cannot fix it.
04-10-2012, 03:38 PM #2
- Join Date
- Dec 2006
- Thanked 1,857 Times in 1,841 Posts
Good morning hmdnawaz,
To center an element you need three things:
- a valid DocType
- an element with a width
- that elements right/left margins set to auto
In your case, putting a 1,000px width on body may not be the best approach since body's background image is larger than that. Put your width and centering on .page instead.
Mostly you need to clean up some of that CSS!! There is multiple entries for every element in each linked CSS file along with markup, which defiinetly doesn't belong in there.
See the links about validation in my signature line. Validating will help you a lot!