The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End How to get 100% width but in one portion of bg

  • This topic is empty.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #43673

    Hello I would like to know I have part html and part php code but would like to know how to make this as 100% width width because at the moment when I do it it only stays in the container 980px wide

    div id=”content-top”

    #content-top {
    background: #000;
    width: 100%;
    height: 390px;


    Take it out of the container.

    Divs are 100% width of the browser window **unless** they are in other elements that restrict their size. In which case they are automatically 100% width of the containing element.

    If you are going to have a divs that will be full browser width **but** you still want the content contained (presumably because your want a full width bar or something) then you have to get out of the mindset that “everything is in a single container”.

    It’s just not going to work.

    The ideal solution is to set up, in effect, rows of sections for the various levels of your page. If you need to have some content inside a defined width then you have to add ‘inner’ divs/containers which have that set width.

    Here is a very basic example:

Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘Back End’ is closed to new topics and replies.