Div Positioning follows the other div [closed] - css

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
Having a little problem with the comment part on the website i'm working on:
http://whybaguio.com/php/profile/businessprofile.php?id=103#
See how the ADD YOUR OWN FEEDBACK! div goes down together with the Facebook comment. I don't know how to not let it go down with the facebook comments.... Lol, I'm not really sure if I'm explaining my self right but I hope you guys get it...
I tried positioning it relative and absolute but it goes out of its parent div....
Please help me out, thank you!

Okay, this is a problem with how to use position:absolute; What you need to do is change your code like this:
#feed {
background: white;
height: 280px;
padding: 10px;
margin-top: 295px;
overflow-y: auto;
margin-left: -580px;
position: relative;/*this needs to have a position for .secondcomment to 'hook on' to*/
}
.secondcomment {
position: absolute;
top: 10px;
right: 0;
}

If i understand it right: place the "ADD YOUR OWN FEEDBACK" div before the "Facebook comment" div in your HTML code.
Your "ADD YOUR OWN FEEDBACK" div has a "float: right" property and blocks with "float" should go before non-floating blocks.

You can set float: left; property to .fb-comment class, and remove margin-left property from .secondcomment class.

Related

prestashop css vertical and horizontal centering [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 8 years ago.
Improve this question
Hi i need help with centering few images on my prestashop webpage.
I need help with 3 circles on bottom of the page (not with social icons) . I don't how center the images in circles.
Please help
You can go for absolute position those images inside their container, and work your way from there like so:
position: relative for .certifikat class, so any absolute positioned children, will be bound to their container
position: absolute for <img> inside the .certifikat class
So to wrap it up, for the .certifikat class use:
.certifikat{
position: relative;
overflow: hidden;
/*rest of your code*/
}
If you know the width and height of these <img> tags, you can center them by:
.certifikat img{
position: absolute;
top: 50%; left: 50%;
margin-left: -(halftheirwidth);
margin-top: -(halftheirheight);
}
OR if you don't know their exact width and height you can use the translate method:
.certifikat img{
position: absolute;
top: 50%; left: 50%;
transform: translate(-50%,-50%);
}
Hope this points you in the right direction

How to fix my navigation bar to the top of the page [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions concerning problems with code you've written must describe the specific problem — and include valid code to reproduce it — in the question itself. See SSCCE.org for guidance.
Closed 9 years ago.
Improve this question
I was wondering if anyone could help me out fix my the top portion of my webpage to stay.
I have tried using the position:fixed attribute, but this hinders everything as then my content overlaps the fixed divs.
My website is here:
www.crookedcartoon.co.uk/print.html
I would like everything above the navbar, navbar included to stay glued to the top of the page and the content to scroll under it.
I realise this may mean i'll have to change the majority of my images to jpg instead of png. However, i was wondering if there was anyway around this? As in create a false line that the content scrolls under, then disappears, rather than reaching the top of the page, by where you will see it through the transparent parts of the PNG images. I don't want to use an iframe, really, unless this is the only way.
Thanks!
An iframe is certainly not the right choice here. Put a div around the stuff you want to have on top, put position: fixed on it and position it to the top left corner.
<div class="ontop">
<div id="top"></div>
<div id="logo"></div>
<div id="contact"></div>
<div id="navbar"></div>
</div>
After that, add some margin-top on #content-holder that equals to the height of .ontop. This is necessary because it is taken out of the document flow (because of position: fixed) and content will go under it.
If you also add background-color: white to .ontop, your transparency problems will be gone.
Tried to replicate your setup, here is a working demo.
you may try this
please update below css as i have updated the image by making the portion at the bottom transparent,making the top background white. [1 - DOWNLOAD IMAGE AND CHECK IT]
#ontop {
background: inherit;
height: auto;
margin-top: -10px;
position: fixed;
z-index: 10;
}
#contact {
background: none repeat scroll 0 0 white;
height: 45px;
margin-bottom: 1px;
margin-left: -5px;
margin-top: -8px;
position: relative;
vertical-align: top;
width: 1127px;
}
#logo {
height: 62px;
margin-left: -10px;
position: relative;
width: 1127px;
z-index: 1111;
}
]
1

Space between slider and header? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
Hi I have a test page up here http://blueanchorcreative.com/
There is a little tiny gap between the slider and the header and I can't figure out what it is? I tried applying overflow hidden to the header but that jacked up the rest of the page and I couldn't figure out how to make that work! Please help a newbie!
LOOK AT THE VALUE:
#slideshow > div {
bottom: 10px;
left: 10px;
position: absolute;
right: 10px;
top: 10px; // this value to 0px
}
You just need to remove top: 10px value from the rule:
#slideshow > div {
top: 0;
}
It's at the line 195 of http://blueanchorcreative.com/style.css

CSS issue with a Background Image [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I'm trying to add a background image to my site-header. Part of the image should be covered by the main-content.
It is positioned correctly however even though I've added z-index, the main content doesn't cover the background image.
Here is the website.
Why would that be?
Thanks!
Edit:
If you look on the right side you will see the brown egg is not covered by the main content. You can still see part of it.
Here is some code:
.header-navigation.back {
z-index:-1;
position:absolute;
margin-left:0;
margin-top:-6px;
border:none;
display:block; height:137px; width:1171px; padding:0px; outline:none; text-indent:-9999px;
background-image:url('http://frenchegg.com/images/backmenu.png');
}
and here is the main content that should cover the image:
.main-content {
z-index:99;
position:relative;
padding:1em 0 8.5em 0;
background:#fff;
}
please add the overflow:hidden css to the header-wrap class
.header-wrap {
...
overflow: hidden
...
}
and it should look good.
For the log in issue:
remove the z-index: 99999 from the class .bann
and add this css to the class tooltip-wrap
sorry something went wrong
Thanks
Seems like you could just reduce the height of the header-navigation.back rule to 100px rather than mess with z-index.
I changed the bann class to :
.bann {
cursor: pointer;
display: block;
height: auto;
position: relative;
width: 101.5%;
z-index: 99999;
margin-left: 12px;
}
after that it seems ok ... check it and inform me of the result;
I tested the code above with firebug ;)

I have a css style but the alignment is fixed in chrome but not in firefox [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
The below css coding is used in my page. But in chrome it displays the image fine. but in firefox it breaks. I dont know why it shows like that. If anybody know the solution for this please help me. Thanks in advance.
.vote
{
position:absolute;
margin: 53px 3px 0 115px;
}
http://domian.com/mysite/pollpage.php?id=2&mview=72
This is my website page. The vote image alignment is correct in chrome but not in firefox
add position relative
.contentbox
{
position: relative;
}
and remove margin ,
add bottom and right
.vote {
position: absolute;
bottom: 0;
right: 45px;
}
...
Now define your main div #polling .pollpagewidth div .contentbox position relative and give to img tag position absolute and define right or bottom value according to your design
Hi now add this css in your style sheet and fixed this problem
#polling .pollpagewidth div .contentbox{
position:relative;
}
.contentbox > img {
bottom: 16px;
margin: 0;
padding: 0;
position: absolute;
right: 43px;
}

Resources