How can I move a banner ad outside the 960px width - css

I have a news site and have a 300x600 banner in the middle of every post on the left side.
I want to move the banner 150px outside the 960px wide "page", so the banner is half in and half out.The only way I have figured out how to move the banner left is position:absolute, but the text doesnt wrap around the banner - which is what I need.

Yes, position:absolute doesn't wrap text because you are removing the element from the flow of the document.
You can margin it out by 150px using margin-left:-150px however, your css for the class .entry has overflow:hidden which will have to be removed in order for you to margin the banner ad outside the 960px post. Just be careful that removing that property doesn't cause other problems with your site.

Try with the property margin-left:-150px;

Related

CSS only technique to make dynamic div height, expandable to contend outside of it

I am building a web site for home made jewelry. I'd like it nice and centered ( for all those ppl with low resolution ) so all of the titles, navigation and content are in a single div, that I positioned in the center. On the left ( inside the div, everything is inside the div ) I have my vertical navigation sidebar div. On the right I have the title and the content. So far so good. Now to the problem:
I would like my sidebar to have a right border all the way from the top of the page to the bottom ( with 1em margins if possible ). The trick is that my content to the right variate from text to pictures and forms and is quite different on every page - when the content is larger then the screen the screen scrolls and in which case I'd like my sidebar border to scroll down with it - I've not been able to do that.
I think I have done quite a reading - my closest solution was to set the border's position to static but this quite obviously isn't working when the site is centered. So to the question - is there any CSS only way to make the sidebar div's height dynamic or something and define it to expand with the content to the right? This way the border will always reach the bottom.
Wrap your navigation in another div. Give this new div a height of 100% and assign it a border-right CSS property. You can also set padding too. Hope this helps.
How about giving left border to the content section Div, instead of Nav menu. so that way the border could change height according to the content area height
body,html{
height:100%;
}
#wrapperdiv{
height:100%
}
#navigation{
min-height:100%
}

100% height divs not at 100%

I'm working on this website: www.lumn.net . The center panel (#overall) is supposed to be a div that stretches from the top to the bottom of the page. For some reason I can't figure out, I'm getting space at the bottom of every page. Even stranger, on only two pages, lumn.net/index.shtml and lumn.net/about.shtml, there's space at the top and the bottom both. <-- fixed
html and body both have height:100%.
If I set the height of the center panel to 100%, on the pages with extra space only at the bottom, it instead goes to 600px, a minimum height for one of its internal divs, and content beyond that runs out the bottom. On the pages with extra space at both the top and the bottom, nothing happens.
Setting top:0 and bottom:0 for the center panel has no effect on any of the pages.
I have no idea what I'm doing wrong or how to fix it other than things I've already tried.
Update: the problem with the space at the bottom was due to my footer being outside the center div and moved up into it using negative margins. When I move it inside, however, I still have a strange bit of extra space below it: lumn.net/about.shtml. How can I sit it inside my #overall center div properly?
Try changing the padding-bottom on #overal:
padding-bottom: 18px
Does that solve your problem?
On the homepage and about page you have some strange extra characters "? "
Maybe a php tag badly open?
Have you tried tp put a height of 100% on #overall? (for me it works...)
Your footer has a height of 28px (including the border) and a top of -42px. That leaves 16px of #overall sticking out below it - only 8px of which seems to be intentional.
As for the top of the page, that seems to be caused by an extraneous question mark (barely visible in the upper left-hand corner of the page).

Attach div element to the bottom of page

I have a page where the main content has a variable height. I want to have a fixed height (about 50px) footer to the very bottom of the page.
I need it to scroll along with the page (so not a fixed position).
A couple scenarios:
If the body content is 300px tall, the window has no scrollbar, the footer would be all the way to the bottom and visible.
If the body content is 900px tall and the window has a scrollbar, the footer would be all the way at the bottom with no space between the footer and the bottom of the window, and not visible unless you scroll to the very bottom.
Is there a way to accomplish this in pure CSS? Trying to stay clear of using JS to handle this.
see the fiddle for code and demo
fiddle: http://jsfiddle.net/gLpFJ/
demo: http://jsfiddle.net/gLpFJ/embedded/result/
Note: Please note this http://jsfiddle.net/yp4EH/ is not for the answer it is just for demonstration purpose.
I am giving this for help and for concept purpose This fiddle http://jsfiddle.net/yp4EH/ is not related with this question but based on same situation - sidebar, content, footer at bottom always.

Div doesn't start after the previous div, it gets hidden behind

http://mehulkar.com/CD
This is driving me insane. I have a fixed position header and a fixed position footer. I want the page class to scroll between the two.
For some reason, my page class starts at top:0 of the entire document, instead of starting below the header.
I could bypass the problem by relative positioning all contents of the div by the appropriate height, but I will be using page IDs to navigate the page. So when I navigate to an #ID using an a link, it navigates to the top of the document.
How do I fix this!?
Your header position is fixed, which takes it out of the flow of the document. Not only does that mean it sits where you put it, but it also means it doesn't push the content below it downwards.
Easy fix would be to add a margin to the page div that's exactly the size of the "always-on-top" header.
your css class "cleared" seems to have a height of 0. make sure the min-height is set to 100px
To start with try changing your page class property:
margin:0 to margin-top: 100px
To move the footer to the left, if that is what you want remove:
right: 0 from your #footer css.
Also remove position:absolute from #content css and add margin-left:200px;
And add margin-bottom:50px to the .wrap class in css.
Once all these changes have been made you should have your header at the top, footer at the bottom, both left aligned. And the content of the page readable and scrollable between the header and footer, with it all being visible with scrolling.
Any questions just ask.

Sidemenu overlaps when browser window is restored

Check my website, and see the Divisions left menu. When you have maximized your broswer there is no problem, but when you restore it to half of screen, the left menu overlaps to the right.
Here is the CSS code. Can someone help me?
It's because your "divisions" div is absolutely positioned.
You can remove "position: absolute" and increase the width of the "divisions" div to 300px.
Your left menu is absolutely positioned that's why it overlaps other content when window size is too narrow. But the solution for this problem is quite tricky and actually depends on what you want to achieve.
Percentage
One possible solutions would be to set width on "divisions" and "content" div in percentage. This way they'll never overlap. But it depends if you can afford to have dynamic width for your "content" div.
Repositioning
If your content must be fixed width... You'll first have to decide how would you like your content/menu to appear when window is too narrow (maybe even narrower than content width)... And work from there.
Body element width
Set minimum window content (as in <body>) width. Either by using:
transparent image at the beginning of your document <img src="t.gif" width="1250">
set body's minimum width css as min-width: 1250px; has to be 1250px wide, because content is centrally positioned, so it must have equal space on the left and on the right (right one being useless empty space just allowing non overlapping space on the left of content)
The last one is actually the simplest and works. It only makes it a bit wide for smaller screen sizes, but your content width (including menu on the left) already exceeds 1030px anyway...
A very straight-forward and simple
and quick-fix solution would be with CSS :
#content {style.css (line 17)
left:-270px;
margin:0 auto;
padding:30px 10px 0 550px;
position:relative;
width:780px;
}
I tried this in my Firebug and it worked fine. hope it'll suit you're needs :)
next time just use css floats:
put the side menu and the content div in a wrapper,
float:left for the menu, and give the wrapper a fixed width, and center align it.
you can also make the navigation menu go "out" from the left with negative left positioning it.

Resources