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
how to make style settings "skip" a div?
Old 11-28-2007, 01:40 PM how to make style settings "skip" a div?
dansgalaxy's Avatar
Defies a Status

Posts: 6,521
Name: Dan
Location: Swindon
Trades: 0
okay this will sound strange, how can i make things like top/side margins be 0 on one div but still affect the rest of the page?

im trying to make a banner things like hotscripts has so i can have messages etc on ALL my sites, and it needs to have 0px for top/left/right so how can i make the body margins Skip this div which will be right after the body tag. and then have the top and side margins?

Thanks,
TP if you can help.
__________________
Discounted Web Hosting With XDnet!
>> Get 25% of hosting~ Promo: Webmaster-talk <<

Please login or register to view this content. Registration is FREE
dansgalaxy is offline
Reply With Quote
View Public Profile Visit dansgalaxy's homepage!
 
 
Register now for full access!
Old 11-28-2007, 02:10 PM Re: how to make style settings "skip" a div?
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,371
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
You can't. <body> margins apply to everything inside the body

unless you started playing with negative margins on the header which would soon turn into a lot of messing about.
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is 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-28-2007, 03:48 PM Re: how to make style settings "skip" a div?
vangogh's Avatar
Post Impressionist

Latest Blog Post:
Why Responsive Design?
Posts: 10,815
Name: Steven Bradley
Location: Boulder, Colorado
Trades: 0
Dan I think what you want to do is add an ID or class to the specific div you want to behave differently and then write styles for that div that overwrite the general styles you have for the body.

You can't really have the css skip one element, but you can overwrite the rules for that one element.
__________________
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-28-2007, 04:09 PM Re: how to make style settings "skip" a div?
dansgalaxy's Avatar
Defies a Status

Posts: 6,521
Name: Dan
Location: Swindon
Trades: 0
god this is annouying.

im not sure what you mean vangough, but im thinking i think the best i can do is contain the whole page in a div, add what ever margin settings to that, and then set the thing to 0 so the banner works.

This is all REALLY annouying i wanted to do it so i could just pop a snippet into it and it works

__________________
Discounted Web Hosting With XDnet!
>> Get 25% of hosting~ Promo: Webmaster-talk <<

Please login or register to view this content. Registration is FREE
dansgalaxy is offline
Reply With Quote
View Public Profile Visit dansgalaxy's homepage!
 
Old 11-29-2007, 11:06 AM Re: how to make style settings "skip" a div?
joder's Avatar
Flipotron

Posts: 6,442
Name: James
Location: In the ocean.
Trades: 0
I don't know why your having a problem if you want it like hotscripts. body margin:0, top div to go 100% across the page then
the wrapper div with the margins for the rest of the page which would be a container inside the container with the margins you want.
joder is offline
Reply With Quote
View Public Profile
 
Old 11-29-2007, 12:39 PM Re: how to make style settings "skip" a div?
dansgalaxy's Avatar
Defies a Status

Posts: 6,521
Name: Dan
Location: Swindon
Trades: 0
i know its not hard, its just mainly on my forum which is the pain because all of its template based and i cant be botherd ro find the right bits.

its done now, i couldnt be botherd with the margins... its not that important
__________________
Discounted Web Hosting With XDnet!
>> Get 25% of hosting~ Promo: Webmaster-talk <<

Please login or register to view this content. Registration is FREE
dansgalaxy is offline
Reply With Quote
View Public Profile Visit dansgalaxy's homepage!
 
Reply     « Reply to how to make style settings "skip" a div?
 

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