I want to arrange the text of this site as well as in the picture below
http://i60.tinypic.com/aufae0.jpg
This is my site:
http://avocat.dac-proiect.ro/wp/?page_id=14
This is code HTML:
<p id="text3">
Am reprezentat şi am acordat consultanţă juridică pentru clienţi
persoane fizice române şi străine, instituţii publice, persoane juridice
române şi străine în următoarele domenii:
</p>
<br><br>
<p id="text4">
- agricultură, exploatări agricole, prelucrarea şi comercializarea
produselor agricole;
<br>
- comerţ cu produse alimentare;
<br>
- imobiliar;
<br>
- distribuţie de carburanţi;
<br>
- transporturi;
<br>
- asigurări;
<br>
- producţie şi comercializare utilaje grele;
<br>
- producţie structuri metalice;
<br>
- producţie automatizări;
<br>
- servicii de proiectare;
<br>
- comercializare automatizări;
<br>
- jocuri de noroc;
<br>
- turism, hoteluri şi pensiuni;
<br>
- medical;
<br>
- construcţii civile şi industriale;
<br>
- comercializare utilaje şi autovehicule, service auto;
<br>
- producţie software, administrarea site-urilor;
<br>
- comerţ;
<br>
- bursier, societăţi listate, investitori, fonduri de investiţii.
<br>
- asistenţă şi îngrijire copii şi vârstnici;
<br>
- exploatări forestiere şi prelucrarea lemnului;
<br>
- exploatări agricole;
<br>
- extracţia şi prelucrarea minereurilor;
<br>
- producţia şi comercializarea materialelor de construcţii;
<br>
- instituţii publice;
<br>
- instituţii religioase.</p>
This code CSS:
#text3{
font-size: 17px;
width:20%;
float:left;
padding: 87px 45px 45px 20px;
padding-left:50px;
}
#text4{
-webkit-column-count: 2; /* Chrome, Safari, Opera */
-moz-column-count: 2; /* Firefox */
column-count: 2;
font-size:17px;
padding-top: 50px;
padding-left: 20px;
}
http://jsfiddle.net/s0bsfdu4/10/
The JS editor I managed to arrange text as they wish but I try to make changes on the site looks very ugly ...
Can you help me solve this problem please?
Thanks in advance!
You may solve your problem by simply removing width and float like this:
#text3{
font-size: 17px;
padding: 87px 45px 45px 20px;
padding-left:50px;
}
Have you considered using affix from bootstrap to fix your text to the top?
Right know i write from my mobilephone so I can't test code but here are some ideas:
Use a table with 2 columns and split the text in 2.
<table>
<tr>
<td> first text part </td>
<td> second text part </td>
</tr>
</table>
Table has many elements to set size, position, color, background.
You could also use 2 divs to make the same look
I would put the text into a container. This is centered and a max width of 1200 or whatever you think looks good.
.container {
margin: 0 auto;
max-width: 1200px;
}
Use box-sizing so the border doesn't effect the dimension
* {
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
box-sizing: border-box;
}
Clearfloat after the div
.grid:after {
/* Or #extend clearfix */
content: "";
display: table;
clear: both;
}
Float all divs and add 0 padding to last column
[class*='col-'] {
float: left;
padding-right: 20px;
}
.grid [class*='col-']:last-of-type {
padding-right: 0;
}
Column width
.col-1-2 {
width: 50%;
}
The HTML
<div class="container">
<p>Am reprezentat şi am acordat consultanţă juridică pentru clienţi persoane fizice române şi străine, instituţii publice, persoane juridice române şi străine în următoarele domenii:</p>
<div class="grid">
<div class="col-1-2">
<div class="module">
<h3>1/2</h3>
</div>
</div>
<div class="col-1-2">
<div class="module">
<h3>1/2</h3>
</div>
</div>
</div>
</div>
I would also edit the list to not use < br >'s and start using lists.
Working jsfiddle http://jsfiddle.net/0dLeqg9s/2/
You can read more about it http://css-tricks.com/dont-overthink-it-grids/
Related
so I'm working on a project where I'm supposed to create a website and also talk about internet history & the effect it has had on society. Anyways, my plan or idea was to make 3 individual sections to the webpage. "Home" being Home of the website, just showing image/background and "hello to my assignment", then "history" tab has some text about the history of internet etc, and then the effect on society being the third tab with a text on how it actually has affected society.
Anyways. if you take whatever background, do as I have here you can see I have three current tabs on the right side of the website. I don't know how to add text individually to each one and when you click the next, X text disappears and Y text arrives next to that ones name. How can I do this?
* {
margin: 0;
padding: 0;
}
html,
body {
width: 100%;
height: 100%;
font-size: 14px;
font-weight: normal;
/* standard font "vikt" bold/italic etc eller nummer som 400*/
}
.background {
width: 100%;
height: 100%;
background-image: url(../css/qwx.jpg);
background-repeat: no-repeat;
/* spelar bara bakgrunden en gång och inte repeterad igen */
background-size: cover;
/* "cover" för att täcka hela "elementet" alltså bakgrunden */
position: relative;
/* position relativ gör så att den positioneras relativ till sin "originella" position. */
}
.rad {
width: 150px;
height: auto;
/* istället för "100% elr 80%" eller liknande så är den automatisk för att vara mer "flexibel" */
position: absolute;
/*används för att positionera "relativt" med sin närmaste positionerade "parent" */
left: 0%;
/* 0% för vill ha den i vänstra hörnet */
top: 30%;
/* vill ha i mitten ish o för mig såg det bra ut iaf (vet inte om detta ändras beroende på upplösning eller liknande, har ej provat */
}
.rad a {
text-decoration: none;
font-size: 20px;
font-family: "Tahoma", "Comic Sans MS";
/* två "fonts" ifall den första inte finns/laddas in */
font-weight: 600;
/* tjockleck */
height: 80px;
margin: 3px 0;
float: left;
display: inline-block;
background-color: black;
color: white;
line-height: 80px;
text-align: center;
/* center för att stoppa texten i mitten av rutan */
/*-- inlineblock används för att få bredden & höjden att respekteras, samt padding/margin */
transition: 400ms;
/* lite längre tid för att knapparna ska registreras som att dom är pekade på, blir en fin liten effekt */
}
a.active,
.rad a:hover {
background-color: white;
color: black;
width: 100%;
/* vill ha det så att när man häver över muspekarn så blir rad a 100% bredd, medans när rad a, b, c, är inaktiva och inte har muspekaren över är mindre */
}
.a {
width: 90%;
}
.b {
width: 80%;
}
.c {
width: 80%;
}
<div class="background">
<div class="rad">
<a class="a active" href="#">Startsida</a>
<a class="b" href="#">Historia</a>
<a class="c" href="#">Påverkan</a>
</div>
</div>
What follows utilizes Bootstrap and JQuery to create a very simple version of what you are describing, but I'm guessing probably not what you need.
It is however an excellent example of how far internet programming has come since its modest beginning.
Some html markup and some user provided content and here you have a simple "3 page" website
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.1/css/bootstrap.min.css">
<script src="https://code.jquery.com/jquery-3.3.1.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.1/js/bootstrap.min.js"></script>
<div class="container">
<div class="row">
<div class="col-3">
<div class="nav flex-column nav-pills" id="v-pills-tab">
<a class="nav-link active" id="v-pills-home-tab" data-toggle="pill" href="#v-pills-Startsida">Startsida</a>
<a class="nav-link" id="v-pills-profile-tab" data-toggle="pill" href="#v-pills-Historia">Historia</a>
<a class="nav-link" id="v-pills-messages-tab" data-toggle="pill" href="#v-pills-Påverkan">Påverkan</a>
</div>
</div>
<div class="col-6">
<div class="tab-content" id="v-pills-tabContent">
<div class="tab-pane fade show active" id="v-pills-Startsida">
<div class="float-left mt-1 ml-1 mr-3 mb-3">
<img src="https://picsum.photos/100" />
</div>
<span>Startsida</span>
</div>
<div class="tab-pane fade" id="v-pills-Historia">Historia</div>
<div class="tab-pane fade" id="v-pills-Påverkan">Påverkan</div>
</div>
</div>
</div>
</div>
I am trying to place this paragraph on the right side of my unordered list. The problem I am facing right now is that the text on the right is forced down below the li. I managed to get it on the right side but I can't manage to get it on the same "height".
The code if it helps.
img{
height: 200px;
width: 250px;
border: solid green 1px;
margin-top: 20px;
}
aside#Asid_vilkaviär{
width: 30%;
float: right;
margin-right: 150px;
}
<div class="container">
<div class="argumentbild_tjänst">
<img src="miljövänlig_städning_508502626.jpg">
<ul>
<li> Glöm dålig luft </li>
<li> Trevligare omgivning</li>
<li> Roligare vardag </li>
<li> Kompetenta och välutbildade medarbetare </li>
</ul>
<aside id="Asid_vilkaviär">
<h1> Vilka vi är </h1>
<p> Rena-Sopkärlet AB leds av företagets två grundare, Mille Tarp och Magnus Dahl. Företaget består att kunniga och skickliga medarbetare som genom åren har många lyckade
rengörningar av soptunnor bakom sig. Det är alltid kul att uppskattas för sitt arbete och vi har haft många tillfällen att njuta av nöjda kunder. </p>
</aside>
</div>
</div>
To keep the left part in a DIV and set its css as #leftside {float:left; width:60%}
img{
height: 200px;
width: 250px;
border: solid green 1px;
margin-top: 20px;
}
#leftside {float:left; width:60%}
aside#Asid_vilkaviär{
width: 40%;
float: right;
}
<div class="container">
<div class="argumentbild_tjänst">
<div id="leftside">
<img src="miljövänlig_städning_508502626.jpg">
<ul>
<li> Glöm dålig luft </li>
<li> Trevligare omgivning</li>
<li> Roligare vardag </li>
<li> Kompetenta och välutbildade medarbetare </li>
</ul>
</div>
<aside id="Asid_vilkaviär">
<h1> Vilka vi är </h1>
<p> Rena-Sopkärlet AB leds av företagets två grundare, Mille Tarp och Magnus Dahl. Företaget består att kunniga och skickliga medarbetare som genom åren har många lyckade
rengörningar av soptunnor bakom sig. Det är alltid kul att uppskattas för sitt arbete och vi har haft många tillfällen att njuta av nöjda kunder. </p>
</aside>
</div>
</div>
There are newer/modern/new standards methods of styling like css grid and flexbox that can sort this out with the various advantages like responsiveness(good for mobile device viewing) and height. I noticed "height" meant something else in the answer you appreciated. Here is another way of doing what you wanted using grid.
/* This here takes care of all the layout. The following child elements just fold into this. This will also give you equal height for the columns irregardless of the content either sides */
.argumentbild_tjänst {
display: grid;
grid-template-columns: 3fr 6fr;
}
img{
height: 200px;
width: 250px;
border: solid green 1px;
margin-top: 20px;
}
/* There is no need to use percentages to determine size. The fr units took care of that I am using the # to color the text and background. all the layout was already taken care off */
#leftside {
background: #de2;
color: #000;
padding: 10px;
}
aside#Asid_vilkaviär{
background: #a03;
color: #fff;
padding: 10px;
}
<!-- Your html remains instact but could also be reduced using the modern methods. Doesnt matter anyway -->
<div class="container">
<div class="argumentbild_tjänst">
<div id="leftside">
<img src="https://images.pexels.com/photos/442584/pexels-photo-442584.jpeg">
<ul>
<li> Glöm dålig luft </li>
<li> Trevligare omgivning</li>
<li> Roligare vardag </li>
<li> Kompetenta och välutbildade medarbetare </li>
</ul>
</div>
<aside id="Asid_vilkaviär">
<h1> Vilka vi är </h1>
<p> Rena-Sopkärlet AB leds av företagets två grundare, Mille Tarp och Magnus Dahl. Företaget består att kunniga och skickliga medarbetare som genom åren har många lyckade
rengörningar av soptunnor bakom sig. Det är alltid kul att uppskattas för sitt arbete och vi har haft många tillfällen att njuta av nöjda kunder. </p>
</aside>
</div>
</div>
i have this site:
http://avocat2.dac-proiect.ro/?page_id=17
Look at the picture below to understand which is my problem
This problem is each page on mobile.
Do not see the last lines of text
<div class="entry-content2">
<div class="gigi">
<div class="row">
<div class="col-sm-12 col-md-12 col-lg-12 style=" "="">
<img src="http://avocat2.dac-proiect.ro/wp-content/themes/WordPressBootstrap-master/images/LOGOb.png" class="img-responsive center-block" style="min-width:156px;min-height:83px">
</div>
</div>
</div>
<div class="parentVerticalCenter">
<div class="childVerticalCenter">
<p class="text-center" style="color:white;font-size:17px;padding-left:50px;padding-right:50px;/*padding-top:20px;*/padding-bottom:20px;">În afara sediului nostru, asigurăm reprezentarea şi consilierea clienţilor noştri în Bucureşti şi în judeţele Alba, Oradea, Arad, Sibiu, Braşov, Timişoara. În domeniul proprietăţii intelectuale colaborăm cu societatea Actamarque S.R.L.Putem asigura colaborari cu notari, traducatori autorizati, consultanti fiscali.</p>
<div class="wrap">
<div class="wrap1">
<div class="image1">
<p class="titlu">Zorica L. Codoban </p>
<p class="subtitlu">Avocat</p>
<p class="bbb">
– avocat din anul 1997;</p>
<p class="bbb">
– domenii de specialitate: drept civil, drept comercial,drept succesoral, drept imobiliar, dreptul muncii,drept administrativ, dreptul familiei;</p>
<p class="bbb">- limbi vorbite: franceza.</p>
<p></p>
</div>
<div class="image2">
<p class="titlu">Sorina Sabo </p>
<p class="subtitlu">Avocat</p>
<p class="bbb">
– avocat din anul 2008, îşi desfăşoară activitatea în calitate de cabinet individual la acelaşi sediu;</p>
<p class="bbb">- domenii de specialitate: drept civil, drept comercial, drept imobiliar, dreptul familiei, drept administrativ, drept penal, proprietate intelectuală;</p>
<p class="bbb">- limbi vorbite: franceza.</p>
<p></p>
</div>
<div class="image3">
<p class="titlu">Susana Mandrutiu </p>
<p class="subtitlu">Asistent manager</p>
<p class="bbb">
– experienta in domeniu din anul 2009;</p>
<p class="bbb">- experienta anterioara ca merciolog;</p>
<p class="bbb">- limbi vorbite: franceza.</p>
<p></p>
</div></div>
<div class="wrap2">
<div class="image4">
<p class="titlu">Andaluna I. Bogdan</p>
<p class="subtitlu">Avocat</p>
<p class="bbb">
– avocat din anul 2013, îşi desfăşoară activitatea în calitate de cabinet individual la acelaşi sediu;</p>
<p class="bbb">- domenii de specialitate: drept civil, drept comercial, drept european, drept imobiliar, drept administrativ;</p>
<p class="bbb">- limbi vorbite: engleza, franceza.</p>
<p></p>
<p></p></div>
<div class="image5">
<p class="titlu">Mihai A. Codoban </p>
<p class="subtitlu">Avocat</p>
<p class="bbb">
– avocat din anul 2009, îşi desfăşoară activitatea în calitate de cabinet individual la acelaşi sediu;</p>
<p class="bbb">- domenii de specialitate: drept comercial, drept administrativ, drept fiscal, dreptul muncii, dreptul asigurărilor, dreptul pieţei de capital, proprietate intelectuală;</p>
<p class="bbb">- limbi vorbite: germana, italiana, engleza, franceza.</p>
<p></p>
<p></p></div>
<p></p></div>
</div></div>
<p></p></div>
</div>
CODE CSS:
#media screen and (min-width: 850px)
{
.image2,.image3,.image5
{
margin-left:20px;
}
.wrap1
{
margin-bottom:20px;
}
}
How can I solve this problem?
Thanks in advance!
The reason is because your mobile menu overlaps the div.
A quick solution is to add padding-bottom: 100px (or change according to what you need) to .entry-content2
I Think this is better than just adding padding bottom to the text, as in this way you avoid the overlap on the image as well.
the reason for that is because on mobile the div s overlap try using padding and more percents instead of set px lengths/padding/etc. really best thing to do is to just make a separate CSS that fits mobile and then when you are on mobile have a button or have it automatically (google it) switch to that
Try to change your ".mobil"-class
/* For Example */
.mobil {
position: fixed;
bottom: 36px;
padding-top: 0px !important;
}
and add a "padding-bottom:75px;" to your body class for example.
#media only screen and (max-width : 480px) {
body {
padding-bottom: 75px;
}
}
This is the site:
http://avocat.dac-proiect.ro/wp/?page_id=14
This is the code:
http://jsfiddle.net/s0bsfdu4/
This is an image that I want to understand how I want to arrange text
http://i60.tinypic.com/308w3d2.jpg
Code HTML:
<p id="text3">Am reprezentat şi am acordat consultanţă juridică pentru clienţi persoane fizice române şi străine, instituţii publice, persoane juridice române şi străine în următoarele domenii:
<br><br>
- agricultură, exploatări agricole, prelucrarea şi comercializarea produselor agricole;
<br>
- comerţ cu produse alimentare;
<br>
- imobiliar;
<br>
- distribuţie de carburanţi;
<br>
- transporturi;
<br>
- asigurări;
<br>
- producţie şi comercializare utilaje grele;
<br>
- producţie structuri metalice;
<br>
- producţie automatizări;
<br>
- servicii de proiectare;
<br>
- comercializare automatizări;
<br>
- jocuri de noroc;
<br>
- turism, hoteluri şi pensiuni;
<br>
- medical;
<br>
- construcţii civile şi industriale;
<br>
- comercializare utilaje şi autovehicule, service auto;
<br>
- producţie software, administrarea site-urilor;
<br>
- comerţ;
<br>
- bursier, societăţi listate, investitori, fonduri de investiţii.
<br>
- asistenţă şi îngrijire copii şi vârstnici;
<br>
- exploatări forestiere şi prelucrarea lemnului;
<br>
- exploatări agricole;
<br>
- extracţia şi prelucrarea minereurilor;
<br>
- producţia şi comercializarea materialelor de construcţii;
<br>
- instituţii publice;
<br>
- instituţii religioase.</p>
Code CSS:
#text3{
-webkit-column-count: 3; /* Chrome, Safari, Opera */
-moz-column-count: 3; /* Firefox */
column-count: 3;font-size: 17px;padding: 45px;margin: 100px;width: 80%;}
Basically I want to arrange text in 3 columns ... the first column to be selected text in the image and the rest of the text to be divided into 2 columns.
It can do this in CSS?
Can you help me to solve this problem?
Thanks in advance!
I've updated your fiddle. Check if is ok HERE
i use the following code to put text beside image:
<div style="display:inline-block;vertical-align:bottom">
<p><img src="CIMA/CimaMetanoia.png" alt="Cool" height="50%" width="50%" /></p>
</div>
<div style="display:inline-block;">
<p class="text">
<div> <font color="#d54646"><b>MOVIDA</b> es un ministerio christiano, latino, internacional <br> e interdenominacional con el propósito de: </font> <br><br> </div>
<div> <b><font color="#2089a4">DESAFIAR</font></b> <br>al joven christiano a una entrega total a Dios y a crecer en su relación con El.<br><br> </div>
<div> <b><font color="#2089a4">PROVEERLE</font></b> <br> herramientas para que descubra sus dones y talentos.<br><br> </div>
<div> <b><font color="#2089a4">MOTIVARLO</font></b> <br> a un servicio comprometido en su iglesia local y movilizarlo a las misiones mundiales.<br> </div>
</p>
</div>
However, even if i change the size of my image, it is always above the text... why?
Finally i used the template "initializr" (see google), because it makes all responsive too, which i needed! thank you all anyway!
you might try adding the position property to the image
so, in this case,
image{position:fixed , absolute , relative; top:50%; left:50%;}
or this may work as well:
<div>
<image></image>
<p></p>
</div>
A commenter asked that I work with your code only. So, here's a solution using your code, to make the 2 divs sit next to each other.
<div style="float: left; width: 49%;">
<p><img alt="Cool" src="http://placehold.it/350x150" height="50%" width="50%" /></p>
</div>
<div style="float: right; width: 49%;">
<p class="text">
<div> <font color="#d54646"><b>MOVIDA</b> es un ministerio christiano, latino, internacional <br> e interdenominacional con el propósito de: </font> <br><br> </div>
<div> <b><font color="#2089a4">DESAFIAR</font></b> <br>al joven christiano a una entrega total a Dios y a crecer en su relación con El.<br><br> </div>
<div> <b><font color="#2089a4">PROVEERLE</font></b> <br> herramientas para que descubra sus dones y talentos.<br><br> </div>
<div> <b><font color="#2089a4">MOTIVARLO</font></b> <br> a un servicio comprometido en su iglesia local y movilizarlo a las misiones mundiales.<br> </div>
</p>
</div>
EDITED
Below I've posted code that in my mind is better formatted for your solution. Just wanted to offer up some alternatives.
<style type="text/css">
.left {
float: left;
width: 50%;
height: 50%;
}
.left img {
width: 100%;
height: 100%;
}
.right {
float: right;
}
.movida strong {
color: #d54646;
}
.common strong {
color: #2089a4;
}
.text strong {
display: block;
font-weight: bold;
}
</style>
<div class="left">
<p><img src="CIMA/CimaMetanoia.png" alt="Cool" /></p>
</div>
<div class="right">
<p class="text">
<div><span class="movida"><strong>MOVIDA</strong>es un ministerio christiano, latino, internacional e interdenominacional con el propósito de:</span></div>
<div><span class="common"><strong>DESAFIAR</strong>al joven christiano a una entrega total a Dios y a crecer en su relación con El.</span></div>
<div><span class="common"><strong>PROVEERLE</strong>herramientas para que descubra sus dones y talentos.</span></div>
<div><span class="common"><strong>MOTIVARLO</strong>a un servicio comprometido en su iglesia local y movilizarlo a las misiones mundiales.</span></div>
</p>
</div>
The text is pushed below the image because the combined width of the two container divs is wider than the page, so it pushes the second div below the first one:
<div style="display:inline-block;vertical-align:bottom;width:200px;">
http://jsfiddle.net/3Luby/