• Resolved sittingonanmm

    (@sittingonanmm)


    Hi,

    I’m customizing the theme with my own CSS and this code, which works elsewhere, does not seem to respond on this theme. I don’t know what I’m missing here, any help will be appreciated!

    span.paradestacargeorgia {
    	float: left;
    	margin-right: 15px;
    	border: 1px solid #E5E5E5;
    	color: #333333;
    	display: block;
    	font-family: Georgia, Serif;
    	font-size: 100%;
    	margin-top: 25px;
    	padding: 12px 8px 8px;
    	position: relative;
    	text-align: left;
    	width: 70%;
    }
    span.paradestacartitulo {
    	background: #D19E34 none repeat scroll 0 0;
    	color: #ffffff;
    	display: block;
    	font-family: Arial, Sans-Serif;
    	font-size: 100%;
    	font-style: italic;
    	font-weight: normal;
    	left: 10px;
    	padding: 3px 8px;
    	position: absolute;
    	top: -15px;
    }
    div.floatright {
    	float: right;
    	width:280px;
    	margin:0 0 0px 0px;
    	padding:10px;
    	text-align:center;
    }

    The page in which it’s not working is this one (it’s in Spanish), and the code is on the paragraph under the first heading, like this:
    <div class="floatright"><span class="paradestacargeorgia"><span class="paradestacartitulo">Para Destacar</span>Lo más culminante de este panel fue la exposición de la información estratégica más actualizada en temas de salud sexual y reproductiva de adolescentes en la región.</span></div>

Viewing 4 replies - 1 through 4 (of 4 total)
  • You have a syntax error in your CSS. If you look above the rules for floatright, you will see this:

    span.dropcap {
    	display: block;
    	float: left;
    	font-family: Georgia, Serif;
    	font-size: 400%;
    	color: #081942;
    	line-height: 100%;
    	margin: 0 4px 0 0;
    hr.orange {
      border: medium none;
      margin: 0pt 0pt 1.4em;
      background: rgb(163, 77, 0);
      color: rgb(163, 77, 0);
      clear: both;
      float: none;
      width: 100%;
      height: 1px;
    }

    You are missing a closing right brace (}) just before the hr.orange selector. Add that in and your page will look fine.

    Thread Starter sittingonanmm

    (@sittingonanmm)

    Dear CrouchingBruin, thank you!!! That solved the problem right away. Thank you so much!

    Hi,
    I’ve got a simular problem on my blog Happy-and-healthy.nl. I can’t get the footer widgets to float. Can you maybe take a look and see what i am missing?!?

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    The conversation is long over, create your own thread https://wordpress.org/support/theme/yoko#postform

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Can't make element float with custom CSS’ is closed to new replies.