If a div A is contained inside another div (B) that is 500px wide, how can div A still be the width of the entire screen? I want to “break out” of that 500px div.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
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.
Given your question, you could use
position:absolutein div A. It will find the nearest positioned parent (a parent that has either fixed, absolute or relative position). But you need to have the nearest positioned element have 100% width and is positioned snug to the left.here’s a demo using body