Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8621395
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T06:48:40+00:00 2026-06-12T06:48:40+00:00

I am using CarouFredSel as my carousel and I want to visually vertically align

  • 0

I am using CarouFredSel as my carousel and I want to visually vertically align the text content within this carousel to my body content. I know you can do this with javascript (I have commented it out) by adjusting the left property of #carousel based on the browser width but I am looking for a CSS solution.

screenshot describing my problem
The blue screenshot on the left is displaying the website when the browser is maximized, and the ‘link3’ in the carousel appears to be aligned with ‘content’. The red screenshot on the right is displaying the website when the browser is minimized, and ‘link1’ is not visually aligned with ‘content’.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<link rel="stylesheet" type="text/css" media="all" href="reset.css">
<script type="text/javascript" language="javascript" src="<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.1/jquery.min.js"></script>"></script>
<script type="text/javascript" language="javascript" src="http://www.sfu.ca/~jca41/stuph/jquery.carouFredSel.js"></script>

<script type="text/javascript" language="javascript">

$(function() {
$('#carousel').carouFredSel({
    items: 1,
    scroll: {
        fx: 'crossfade',
        duration: 1000
    },
    pagination: {
        container: '#pager',
        duration: 500
    }
});

/*$(window).resize(function() {
    var winW = $(window).width();
    var carouselWidth = $('#carousel .slide').css('width');
    carouselWidth = carouselWidth.replace(/[^0-9]/g, '');

    if (winW > carouselWidth) {
        $('#c-carousel').css('left', (winW-carouselWidth)/2 + 'px'); 
    } else {
        $('#c-carousel').css('left', '0px'); 
    }
}).resize();*/

});


</script>
<style type="text/css" media="all">


#heroicCarousel {
    height: 100%;
    padding: 0;
    margin: 0 auto;
    min-height: 250px;
    position: relative;
    z-index: 1000;
    text-align:center;
    max-width:600px;
}
.caroufredsel_wrapper {
    width: 100% !important;
    height: 100% !important;
}
#carousel {
    position: absolute !important;
}
#carousel .slide {
    width:600px;
    height:250px;
    overflow: hidden;
    float: left;
}
#carousel .slide .content {
    font-size: 55pt;
    position: relative;
    top: -100px;
    left: 150px;
    z-index: 5;
}
#carousel .slide img {
    width: auto;
    height: auto;
    min-width: 100%;
    min-height: 100%;
}

#pager {
    position: relative;
    top: -700px;
    left: 0;
    z-index: 10;
    display: block;
    text-align: center;
}
#pager a {
    background-color: #356;
    display: inline-block;
    width: 15px;
    height: 15px;
    margin-right: 6px;
    border-radius: 10px;
    box-shadow: 0 1px 1px #cef;
}
#pager a.selected {
    background-color: #134;
}
#pager a span {
    display: none;
}

#content {
    background: yellow;
    width: 300px;
    height: 300px;
    position: relative;
    margin: 0 auto;
    z-index: 20px;
    top: -520px;
    font-size: 60pt;
}

</style>
</head>
<body>
<div id="heroicCarousel">
    <div class="caroufredsel_wrapper">
        <div id="carousel">
            <div class="slide">
                <img src="http://www.placehold.it/600x250/ff0000/999999">
                <div class="content"><a href="">link1</a></div>
            </div>
            <div class="slide">
                <img src="http://www.placehold.it/600x250/00ff00/999999">
                <div class="content"><a href="">link2</a></div>
            </div>
            <div class="slide">
                <img src="http://www.placehold.it/600x250/0000ff/999999">
                <div class="content"><a href="">link3</a></div>
            </div>
            <div class="slide">
                <img src="http://www.placehold.it/600x250/f0f0ff/999999">
                <div class="content"><a href="">link4</a></div>
            </div>
        </div>
    </div>
    <div id="pager">
        <a href="http://coolcarousels.frebsite.nl/c/18/#" class="selected"><span>1</span></a>
        <a href="http://coolcarousels.frebsite.nl/c/18/#" class=""><span>2</span></a>
        <a href="http://coolcarousels.frebsite.nl/c/18/#" class=""><span>3</span></a>
        <a href="http://coolcarousels.frebsite.nl/c/18/#" class=""><span>4</span></a>
    </div>
</div>
<div id="content">
    content
</div>

</body>
</html>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T06:48:41+00:00Added an answer on June 12, 2026 at 6:48 am

    I usually do it with a wrapping elem around the divs. This elem is as wide as your widest div and any children with margin:0 auto; are centered to it. Example http://jsfiddle.net/5LJhC/1/

    Very simple example but shows how as the carousel width changes the content div is centered

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using the carouFredSel ( http://caroufredsel.frebsite.nl/ ) to create an image carousel, which
using this http://bl.ocks.org/950642 we can see how to add images to nodes, the question
I'm using carouFredSel to create a vertical carousel. Everything works great, except I would
Using WebViewBrush I can render web page content (it's screen shot) to e.g. Rectangle
Using HTML 5, I want to play multiple sounds simultaneously. how can I do
Using a populated Table Type as the source for a TSQL-Merge. I want to
Using CI for the first time and i'm smashing my head with this seemingly
Using Location.getBearing(); I seem to get randomly changing bearings. Aka, I can turn the
Using the navigator.geolocation object in JavaScript. Trying to establish accurate ranges, but wondering exactly
Using WPF/PRISM I want to log my messages through ILoggerFacade to my GUI (A

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.