WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Try to create a new div that will appear on top of everything else (4 posts)

  1. bokin
    Member
    Posted 6 months ago #

    I am working within a theme's parameters.

    This is what I want it to look like:
    http://www.thumbnailart.com/wp-content/uploads/2014/02/WordPress-Site-Design5-New-opening-pages-2.jpg

    This is what I have by trying to put a custom div in the content area of the page.
    http://www.thumbnailart.com/wp-content/uploads/2014/02/takealook-1024x573.jpg

    Is there a way to create a div that ignores the constraints of the parent div? What would be the best way to approach this.

    This is the code I made for the div:

    #biobox {
    	width:35%;
    	background-color:#d9d9d9;
    	height:100%;
    	padding:200px 20px 20x 20px;
    	margin-right:0px;
    	position:absolute;
    	float:right;
    
    }
  2. respectyoda
    Member
    Posted 6 months ago #

    If a child element is to override the parent's constraints, the !important CSS declaration must be added. An example is provided below.

    #something{
        color: #FFF!important;
    }

    Now, if the position is absolute, you can use the top parameter to move it down a little bit. I would suggest to use percentages rather than pixels.

    By the way, I hope you are working with a child theme. :)

  3. bokin
    Member
    Posted 6 months ago #

    Thanks for the quick response. I am working with a child theme, I'm still kind of getting the hang of it though.

    I didn't know that about the elements needing to be "!important" thanks for the tip!

    IT WORKED! THANK YOU!

  4. respectyoda
    Member
    Posted 6 months ago #

    That's great you are working with a child theme. I am glad it worked! Best luck to you with your website!

Reply

You must log in to post.

About this Topic