Centered Image

BR4DLEY

Web Developer
Jan 2, 2012
328
23
Hello devbest,

I am writing this thread because I've encountered a problem, I am unable to make this logo appear in the middle of the page, I've tried using <center> tags and everything and I just don't know what to do?

Screenshot:
xfVqAdL.png


Ignore the logo scribbles, it's just I'm not allowed to give it specific information at this time.


Any suggestions?
 

RastaLulz

fight teh power
Staff member
May 3, 2010
3,934
3,933
Your logo is probably wrapped in a div with a fixed width (smaller than the page width), so it only centers in that area. It's impossible for me to state the exact issue and solution without seeing the code.
 

BR4DLEY

Web Developer
Jan 2, 2012
328
23
The CSS code?
Code:
div.mc-image {
    -webkit-transition: opacity 1s ease-in-out;
    -moz-transition: opacity 1s ease-in-out;
    -o-transition: opacity 1s ease-in-out;
    transition: opacity 1s ease-in-out;
    -webkit-background-size: cover;
    -moz-background-size: cover;
    -o-background-size: cover;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    height: 100%;
    overflow: hidden;
    width: 100%;
}

.in-slide-content div.info-slide {
    background: #FFF url(images/info.png) no-repeat left bottom;
    background-size: 46px 46px;
    position: absolute;
    top: 30px;
    left: 30px;
    width: 46px;
    height: 46px;
    margin: 0;
    display: block;
    text-indent: 10px;
    -moz-border-radius: 23px;
    -webkit-border-radius: 23px;
    border-radius: 23px;
    cursor: pointer;
    z-index: 1000;
    -ms-filter: "progid: DXImageTransform.Microsoft.Alpha(Opacity=50)";
    filter: alpha(opacity=0.5);
    opacity: 0.5;
    -webkit-transition: all 0.3s;
    -moz-transition: all 0.3s;
    -o-transition: all 0.3s;
    -ms-transition: all 0.3s;
    transition: all 0.3s;
}

.in-slide-content div.info-slide:hover {
    width: 200px;
    background: #FFF;
    position: absolute;
    bottom: 40px;
    padding: 10px 20px;
    text-indent: 0px;
    moz-border-radius: 0px;
    -webkit-border-radius: 0px;
    border-radius: 0px;
    z-index: 1000;
    -ms-filter: "progid: DXImageTransform.Microsoft.Alpha(Opacity=100)";
    filter: alpha(opacity=1);
    opacity: 1;
}

.in-slide-content h2, .in-slide-content p {
    padding: 0;
    margin: 0;
    font-size: 12px;
    line-height: 24px;
}

.in-slide-content h2 {
    font-size: 14px;
    color: #444;
    text-shadow: none;
    font-weight: normal;
    text-transform: uppercase;
    z-index: 1001;
    position: relative;
    white-space: nowrap;
}

.info-slide p {
    color: #aaa;
    font-size: 13px;
    text-shadow: none;
    z-index: 1001;
    position: relative;
    margin: 0;
    font-weight: normal;
    white-space: nowrap;
}

.in-slide-content div.info-slide h2 {
    display: none;
    padding: 10px 10px 0 10px;
}

.in-slide-content div.info-slide p {
    display: none;
    padding: 0px 10px 10px 10px;
}

.in-slide-content div.info-slide:hover h2, .in-slide-content div.info-slide:hover p {
    display: inherit;
    padding: 0;
}
 

Sysode

Front-End Developer
Dec 11, 2012
1,673
848
Like others have said, it's kind of difficult to help without seeing the relevant code.

Anyhow, I'll go ahead and give you an easy and quick method to centering an image. Please .
Take not of the comments I've left on the HTML as well, if you any other questions then feel free to ask on here.
 

Users who are viewing this thread

Top