Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

CSS Forum


You are currently viewing our CSS Forum as a guest. Please register to participate.
Login



Reply
Adjusting a div's width
Old 08-03-2010, 12:01 PM Adjusting a div's width
leebert45's Avatar
Novice Talker

Posts: 14
Name: Lee Wentzel
Location: Michigan, USA
Trades: 0
I am working on a site, using CSS extensively (for the first time). I have the site set up with a top section, then navigation is on the left and is 190 px wide.

My whole site is in "#outer" which I have setup as 100% width. In it, I then have my "#toppage", then I have "#links" and "#inner". The problem I am having is that the "#inner" section sometimes is wider than the page, thus the person viewing the site has to scroll horizontally.

Here is what I have setup so far as far as page setup.

Code:
#outer {width: 100%; margin: 0px}
 
#toppage {background-color: rgb(128,0,115); height: 120px}
#toppage h1 {text-align: center; padding: 10px; margin: 0px}
#toppage img {margin: 0px}
 
#inner {display: block; position: absolute; top: 130px; margin-left: 170px;
     margin-right: 20px; padding: 0px}
#inner b {font-size: 14px}
 
#links a  {font-size: 12px; text-decoration: none; display:block; width:125px;
     margin:2px; padding:2px; background-color:#0881b2; text-indent: 10px}
#links a:hover {text-decoration: underline; background-color:#76c4e3}
#links ul {list-style-type: none; margin: 5px; 0px 0px 5px; padding-left: 0px}
#links ul li a {text-decoration: none; color: white}
#links ul li a:hover {text-decoration: underline; color: black}
#links p{margin: 0px; padding-left: 10px}
I would really appreciate any help and feedback anyone can provide me. Thank you in advance.

Leebert45
__________________
It's never "just a game" when you're winning.
~ George Carlin ~
leebert45 is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 08-03-2010, 03:29 PM Re: Adjusting a div's width
vangogh's Avatar
Post Impressionist

Latest Blog Post:
Why Responsive Design?
Posts: 10,815
Name: Steven Bradley
Location: Boulder, Colorado
Trades: 0
Would you mind posting your html too? Or even better a link to the page in question if it's online somewhere. I think we're going to need to see how the page is structured in addition to seeing the css to be able to help solve the issue.
__________________
l Search Engine Friendly Web Design |
Please login or register to view this content. Registration is FREE

l Tips On Marketing, SEO, Design, and Development |
Please login or register to view this content. Registration is FREE

l
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
vangogh is offline
Reply With Quote
View Public Profile Visit vangogh's homepage!
 
Old 08-03-2010, 05:11 PM Re: Adjusting a div's width
leebert45's Avatar
Novice Talker

Posts: 14
Name: Lee Wentzel
Location: Michigan, USA
Trades: 0
Sure, thanks.

The site is at http://www.kdtc.org/new

Thank you.
Leebert
__________________
It's never "just a game" when you're winning.
~ George Carlin ~
leebert45 is offline
Reply With Quote
View Public Profile
 
Old 08-04-2010, 02:48 PM Re: Adjusting a div's width
LadynRed's Avatar
Defies a Status

Posts: 10,017
Location: Tennessee
Trades: 0
The biggest problem I see is that you're using position:absolute on everything and that's not the best way to do a layout and it's also completely unnecessary. You'd be better off learning to use the normal document flow and floats.
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

LadynRed is offline
Reply With Quote
View Public Profile
 
Old 08-04-2010, 03:51 PM Re: Adjusting a div's width
vangogh's Avatar
Post Impressionist

Latest Blog Post:
Why Responsive Design?
Posts: 10,815
Name: Steven Bradley
Location: Boulder, Colorado
Trades: 0
First I agree with LNR about using floats and understanding the normal document flow instead of using positioning for everything. There will be a learning curve, but it will make your life easier.

The only page I see where the content is too wide is the Instructors page. It looks like you have the content inside a table and I see this to start the table

HTML Code:
<table width="1240">
Just remove the width="1240" and your content should fit within the width you want.
__________________
l Search Engine Friendly Web Design |
Please login or register to view this content. Registration is FREE

l Tips On Marketing, SEO, Design, and Development |
Please login or register to view this content. Registration is FREE

l
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
vangogh is offline
Reply With Quote
View Public Profile Visit vangogh's homepage!
 
Old 08-07-2010, 05:18 PM Re: Adjusting a div's width
leebert45's Avatar
Novice Talker

Posts: 14
Name: Lee Wentzel
Location: Michigan, USA
Trades: 0
Thank you all for your help.

Leebert45
__________________
It's never "just a game" when you're winning.
~ George Carlin ~
leebert45 is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Adjusting a div's width
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.92631 seconds with 12 queries