254 Answered Questions for the topic HTML

Html

04/23/19

How can I limit possible inputs in a HTML5 "number" element?

For `<input type="number">` element, `maxlength` is not working. How can I restrict the `maxlength` for that number element?
Html

04/23/19

How to make div not larger than its contents?

I have a layout similar to: <div> <table> </table> </div>I would like for the `div` to only expand to as wide as my `table` becomes.
Html

04/23/19

How to align 3 divs (left/center/right) inside another div?

I want to have 3 divs aligned inside a container div, something like this: [[LEFT] [CENTER] [RIGHT]]Container div is 100% wide (no set width), and center div should remain in center... more
Html

04/23/19

Is it valid to replace http:// with // in a <script src="http://...">?

I have the following element: <script type="text/javascript" src="https://cdn.example.com/js_file.js"></script>In this case the site is HTTPS, but the site may also be just HTTP.... more
Html

04/23/19

How can I get a specific number child using CSS?

I have a `table` whose `td`s are created dynamically. I know how to get the first and last child but my question is:Is there a way of getting the second or third child using CSS?
Html

04/23/19

Best way to center a <div> on a page vertically and horizontally?

Best way to center a `<div>` element on a page both vertically and horizontally?I know that `margin-left: auto; margin-right: auto;` will center on the horizontal, but what is the best way to... more
Html

04/22/19

How to make a vertical line in HTML?

How do you make a vertical line using HTML?

How to save Word documents as HTML to be viewed in Firefox?

I'm in need for saving a Word document as HTML. It has some background images, other images, texts, ...It opens correctly in Internet Explorer, but how can I save a word doc as HTML so that Firefox... more
Html

04/21/19

<code> vs <pre> vs <samp> for inline and block code snippets?

My site is going to have some inline code ("when using the `foo()` function...") and some block snippets. These tend to be XML, and have very long lines which I prefer the browser to wrap (i.e., I... more
Html

04/21/19

Open link in new tab or window?

Is it possible to open an `a href` link in a new tab instead of the same tab? <a href="http://your_url_here.html">Link</a>
Html

04/18/19

Scroll to bottom of div?

I am creating a chat using ajax requests in rails and I'm trying to get a div to scroll to the bottom without much luck.I am wrapping everything in this div: #scroll {  height:400px; ... more
Html

04/18/19

Checkbox size in HTML/CSS?

Is it possible to set the size of a checkbox using CSS or HTML? `width` and `size` work under IE6+ but not with Firefox, where the checkbox stays 16x16 even if I set a smaller size.
Html Web Design

04/17/19

How is HTML5 different from earlier versions of HTML?

Html

04/16/19

How to stop event propagation with inline onclick attribute?

Consider the following: something inside the header How can I make it so that when the user clicks the span, it does not fire the `div`'s click event?
Html

04/15/19

Disable Auto Zoom in Input "Text" tag - Safari on iPhone?

I made an HTML page that has an `<input>` tag with `type="text"`. When I click on it using Safari on iPhone, the page becomes larger (auto zoom). Does anybody know how to disable this?
Html

04/15/19

How to force a line break in a loooooong word in a DIV?

Okay, this is really confusing me. I have some content inside of a div like so: Thisisatest.Thisisatest.Thisisatest.Thisisatest.Thisisatest.Thisisatest. However, the content... more
Html

04/15/19

Get class list for element with jQuery?

Is there a way in jQuery to loop through or assign to an array all of the classes that are assigned to an element?ex. Hello World!I will be looking for a "special" class as in "dolor_spec"... more
Html

04/15/19

Make body have 100% of the browser height?

I want to make body have 100% of the browser height. Can I do that using CSS?I tried setting `height: 100%`, but it doesn't work.I want to set a background color for a page to fill the entire... more
Html

04/15/19

CSS customized scroll bar in div?

How can I customize a scroll bar via CSS (Cascading Style Sheets) for one `div` and not the whole page?
Html

04/14/19

Can I create links with 'target="_blank"' in Markdown?

Is there a way to create a link in Markdown that opens in a new window? If not, what syntax do you recommend to do this. I'll add it to the markdown compiler I use. I think it should be an option.
Html

04/14/19

Set the table column width constant regardless of the amount of text in its cells?

In my table I set the width of the first cell in a column to be `100px`.However, when the text in one of the cell in this column is too long, the width of the column becomes more than `100px`. How... more
Html

04/14/19

Making button go full-width?

I want a button to take up the full width of the column, but having difficulties... Block level button **How do I make the button as wide as the column?**
Html

04/13/19

How to style a checkbox using CSS?

I am trying to style a checkbox using the following: But the style is not applied. The checkbox still displays its default style. How do I give it the specified style?
Html

04/12/19

How to make an image center (vertically & horizontally) inside a bigger div?

I have a div 200 x 200 px. I want to place a 50 x 50 px image right in the middle of the div. How can it be done?I am able to get it centered horizontally by using `text-align: center` for the div.... more
Html

04/11/19

How do I give text or an image a transparent background using CSS?

Is it possible, using CSS only, to make the `background` of an element semi-transparent but have the content (text & images) of the element opaque?I'd like to accomplish this without having the... more

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.

OR

Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.