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
Learning CSS, Help Needed
Old 11-05-2008, 09:10 PM Learning CSS, Help Needed
Madman340's Avatar
Web Designer

Posts: 569
Name: Jared
Location: Florida
Trades: 1
Alright, I've in the process of learning CSS, but I've hit tons of barricades along the way.

This is my latest:


Code:
#header{
background-image:url(images/blackwhite.jpg);
background-repeat:repeat-x;
height:50px;
margin-top:-20px;
margin-left:-20px;
margin-right:-20px
}
#header p{
margin-top:20px
}
#content{
margin:auto;
}
#footer{
margin:auto;
}
With that, I get my top image to completely fill up the top and sides, but there is a x-scrollbar at the bottom which is annoying. When I add "overflow-x:hidden" it just reverts back to how it was before (without the
Code:
height:50px;
margin-top:-20px;
margin-left:-20px;
margin-right:-20px
)

So my question is: How can I remove the x scrollbar without messing up my page?

edit: OH also, if you'd like to help me on any other questions about CSS, please PM me either your AIM or MSN messenger address, so I can add you! Thanks!

Last edited by Madman340; 11-05-2008 at 09:14 PM..
Madman340 is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 11-05-2008, 09:39 PM Re: Learning CSS, Help Needed
Skilled Talker

Posts: 68
Name: Avi Zolty
Location: Atlanta
Trades: 0
Okay, several things to try..
for one keep in mind that different computers with different operating systems and browsers will display stuff differently... perhaps the best bet is to make your background color the same as the background of you image, and make your image slightly smaller.
Also maybe you could experimenting with trying to take out the "repeat-x" part.
Zoltar1992 is offline
Reply With Quote
View Public Profile
 
Old 11-05-2008, 10:32 PM Re: Learning CSS, Help Needed
Madman340's Avatar
Web Designer

Posts: 569
Name: Jared
Location: Florida
Trades: 1
I want the image to repeat-x though, it wouldn't make sense to do that...

I just want to know how to remove the x-scrollbar without messing up my page.
Madman340 is offline
Reply With Quote
View Public Profile
 
Old 11-06-2008, 06:25 AM Re: Learning CSS, Help Needed
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,517
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
don't mess about about with negative margins
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 11-06-2008, 04:13 PM Re: Learning CSS, Help Needed
LadynRed's Avatar
Defies a Status

Posts: 10,016
Location: Tennessee
Trades: 0
In order to figure out why you are getting scrollbars, we really need to see the rest of the code
__________________
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 11-06-2008, 08:33 PM Re: Learning CSS, Help Needed
vangogh's Avatar
Post Impressionist

Posts: 10,688
Name: Steven Bradley
Location: Boulder, Colorado
Trades: 0
We'll need more code or a link to the page in question, but I suspect Chris is right and it's the negative margins that are causing your problem
__________________
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 11-06-2008, 09:44 PM Re: Learning CSS, Help Needed
Madman340's Avatar
Web Designer

Posts: 569
Name: Jared
Location: Florida
Trades: 1
Alright, I've uploaded it: http://www.cheapcss.com

To see the HTML, right-click, view source.

As for the CSS:

Code:
#header{
background-image:url(images/blackwhite.jpg);
background-repeat:repeat-x;
height:50px;
margin-top:-20px;
margin-left:-20px;
margin-right:-20px;
}
#header p{
margin-top:20px
}
#content{
margin:auto;
}
#footer{
margin:auto;
}
Madman340 is offline
Reply With Quote
View Public Profile
 
Old 11-07-2008, 09:26 PM Re: Learning CSS, Help Needed
vangogh's Avatar
Post Impressionist

Posts: 10,688
Name: Steven Bradley
Location: Boulder, Colorado
Trades: 0
The problem is mostly the negative margins. Get rid of those and also the 20px margin on #header p. To make things go to the edge of the window add body {margin:0}

Here's all your code rewritten:

HTML Code:
body {margin:0}

#header{
background-image:url(images/blackwhite.jpg);
background-repeat:repeat-x;
height:50px;
}

#content{
margin:auto;
}

#footer{
margin:auto;
}
See if that works to do what 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!
 
Reply     « Reply to Learning CSS, Help Needed
 

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.40533 seconds with 12 queries