How to Control Width of Title (H2) with CSS?

Tags: html,css,wordpress

Problem :

I've tried the CSS below. All of the other specifications are working except the width. You can see an example of the being too wide here if you need to.

Thanks for your help - Tara

.title h2 {
margin:10px 0 0 0;
font-family: HarabaraHandItalic;
font-size: 30px;
padding: 0 0 0 15px;


Solution :

The width you're using is too wide. Try to make the width 750px for example. You'll see that it works fine!

Keep in mind that the padding will be added to the width of the element. In your case the h2 element is 780px (width) + 15px (padding-left) = 795px.

    CSS Howto..

    css: How to select first anchor tag inside table

    How to achieve two multi-step forms, one form on each side using CSS transformation

    How to control the text inside DIV tag by not allowing the text to be increased?

    Hide Show content-list with only CSS, no javascript used

    CSS/HTML how not to overlap fixed header

    Any ideas about how to use CSS to emulate a messy stamp?

    How to set the jquery draggable with margin left?

    links are showing up on each line, instead of inline

    How to highlight widget title with CSS?

    How to center my main navigation bar on my site with css?

    How to recalculate css with jQuery window resize?

    How to animate the filling of a html element

    how to really include html codes inside php

    How do you get the width of an element without a defined width?

    How to use vertical align in bootstrap

    How to prevent mouseenter event action with jQuery

    How do I make the link in the back div clickable

    How do I resize images on Android?

    How to line up lists side by side?

    How do I set css using jQuery .css after a period of time?

    How to top align two divs inside a third one?

    How to read all numeric values from within a file in php?

    How to create css based breadcrumb which supports IE8 [closed]

    How to fit the parent of a CSS transformed HTML element?

    How to make one list-item in menu higher than the others with CSS?

    How to override css property to default?

    How to display inline input in li?

    How do I deal with the issue of my divs being distorted greatly when zoomed in?

    How to apply a underline style to piece of text

    c3.js - how to show hand cursor on bar chart hover