Jump to content


  • Posts

  • Joined

  • Last visited

Previous Fields

  • Languages
    german, english, italian, french

Profile Information

  • Location
  • Interests
    webdesign, graphics, css styling

Horia_M's Achievements


Newbie (1/7)



  1. dear dsonesuk, thanks a lot for your reply and explanations! I added these details and it works fine now! It was not easy for me to implement this CSS code, because it is a wordpress page with a lot of things determined by a special theme and a visual editor, which I don't know exactly what they do. There's a lot of classes, some of them change names every time you modifiy the layout of a page, etc. Once again, a big "thank you!" Horia
  2. I would have an additional question: I have a lot of pages to adapt like here above (as showed by dsonesuk), and they have each one a different class name for the wrapper of the type ".vc_custom_148144....". How do I write the syntax of someting like that? Do I have to write the code for each page (and class) separately? Or can I make the css code more compact, like this? #later EDIT: it seems to work, the code below! curiously enough, I did not make the same list of various css-classes for the last line, and left it for just one class: .vc_custom_1481449109473 > div {display:inline-block; float: none;} but it seems to work correctly on the live server... .post_content .vc_custom_1481449109473, .post_content .vc_custom_1481449132427, .post_content .vc_custom_1481449821952, .post_content .vc_custom_1481449821952, .post_content .vc_custom_1481406938606 { display: -webkit-box; /* OLD - iOS 6-, Safari 3.1-6, BB7 */ display: -ms-flexbox; /* TWEENER - IE 10 */ display: -webkit-flex; /* NEW - Safari 6.1+. iOS 7.1+, BB10 */ display: flex; /* NEW, Spec - Firefox, Chrome, Opera */ -webkit-box-direction: column-reverse; -webkit-flex-direction: column-reverse; -ms-flex-direction: column-reverse; flex-direction: column-reverse; margin-right: 0 !important; } .vc_custom_1481449109473 > div {display:inline-block; float: none;} }
  3. @dsonesuk: Hey! your code worked like a charm! instantly! Thank you very much! this is great.
  4. @ dsonesuk Thank you for your answer! Do you refer in your answer to the "flex" solution you proposed before, or to my css "table" solution? I tried both, and they both didn't work (at least on the webpage I described before). Here my flex css solution (that does not work in the above mentioned page) ... /* flexbox */ @media only screen and (max-width: 767px) { .flexbox { .vc_row.wpb_row.vc_row-fluid.vc_custom_1481449109473 { display: flex; flex-wrap: wrap; width: auto !important; margin: auto !important; flex-direction: row; } .wpb_column.vc_column_container.vc_col-sm-5 { order: 2; } .wpb_column.vc_column_container.vc_col-sm-7 { order: 1; } } }
  5. Thank you for the "Flex" solution! But "Flex" is not working with some of the mobile phone browsers, and as I need the solution only for mobile view, I think it is not useful... I tested my solution here above with simple html pages, and it worked. So I presume that I am doing something wrong, when writing the CSS code... (syntax? using the wrong classes for the divs I need to change? etc.)
  6. Hi everybody! I hope somebody could help me understand a complex dynamic page structure and to debug my problem, which is as follows: change order of two divs in mobile view When in mobile phone view (screen width < 768 px., showing the content of the page in just one screen-wide column) I want to show two columns of a wordpress page in another order than the one they appear when in desktop view. The left column should appear, in mobile view, under the right column, instead of appearing over (before) the right column. For this, I found the following generic solution (1) : <div id="wrapper"> <div id="firstDiv"> Content to be below in this situation </div> <div id="secondDiv"> Content to be above in this situation </div> </div> @media only screen and (max-width: 767px) { #wrapper { display: table; width: 100%; } #firstDiv { display: table-footer-group; } #secondDiv { display: table-header-group; } } And I am trying to implement it in the page that you can see here: http://www.luxuryexoticproperties.com/test/beoliere-estate/ My problem is that the page, generated dynamically by wordpress, is quite complex in its structure, and contains not only two divs for those two columns, but several divs, "nested" in each other, for each of the two columns, And I simply do not know which css name I should use for my generic example I wrote here above. The generated HTML-code of the two columns in the page is as follows (2) : <div class="post_content"> <div class="vc_row wpb_row vc_row-fluid vc_custom_1481449109473"> <!- here starts the left column of the WP-page, in my opinion -> <div class="wpb_column vc_column_container vc_col-sm-5"> <div class="vc_column-inner vc_custom_1481449100657"> <div class="wpb_wrapper"><div class=""> <p>The building comprises three blocks of flats...(text content)</p> </div> <div class=" " style="margin-top:0px;padding-bottom:20px;"> </div> <div class=""> </div> <div> <!- ... further text etc. -> </div> </div> </div> </div> <!- here starts the right column of the WP-page -> <div class="wpb_column vc_column_container vc_col-sm-7"> <!- images and gmap, etc. - I don't copy their code here, it's too long -> </div> </div> For the html-code above (2), I tried to adapt the CSS code as follows, to produce the effect I wished: "first div" I presumed that the left column is defined by <div class="wpb_column vc_column_container vc_col-sm-5"> "second div" and that the right column is defined by <div class="wpb_column vc_column_container vc_col-sm-7"> "wrapper" and took the <div class="post_content"> as the container of the two columns, as the "wrapper" (table). So the generic CSS solution from above (1), would be transformed into: @media only screen and (max-width: 767px) { .post_content { display: table; width: 100%; } .wpb_column.vc_column_container.vc_col-sm-5 {display: table-footer-group; } .wpb_column.vc_column_container.vc_col-sm-7 { display: table-header-group; } } but using this CSS does not work (it produces not the wished effect, just brings the html-page to a wrong format). I hope my question is not too complicated... And thank you all in advance! Horia
  • Create New...