Go Back   CodingForums.com > :: Client side development > HTML & CSS

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 04-10-2012, 07:35 AM   PM User | #1
hmdnawaz
New to the CF scene

 
Join Date: Apr 2012
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
hmdnawaz is an unknown quantity at this point
html and css width problem

Hi,
Look at this website.
http://harleydragon.info

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 the
Code:
margin:0 auto
to the body tag but it did not solve my problem.

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.
hmdnawaz is offline   Reply With Quote
Old 04-10-2012, 02:38 PM   PM User | #2
Excavator
Master Coder


 
Excavator's Avatar
 
Join Date: Dec 2006
Location: Alaska
Posts: 9,410
Thanks: 22
Thanked 1,765 Times in 1,749 Posts
Excavator has a spectacular aura aboutExcavator has a spectacular aura aboutExcavator has a spectacular aura about
Good morning hmdnawaz,
To center an element you need three things:
  1. a valid DocType
  2. an element with a width
  3. 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!
__________________
Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad
Excavator is offline   Reply With Quote
Reply

Bookmarks

Tags
css, html, width

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 02:44 PM.


Advertisement
Log in to turn off these ads.